hi, I am having a problem with a page redirecting.
I would like the page to show for say, 5 seconds or so then redirect to another page.
Here is the code:
[code=php]<?php
// Checks to make sure that user is logged in
session_start();
if ( $_SESSION[‘user’] == null || $_SESSION[‘user’] < 1 )
{
header( ” Location: index.php” );
exit;
}
require_once( “DB.php” );
$dsn = ‘mysql://hrpjeff_root:password@localhost/hrpjeff_time’;
$db =& DB::Connect( $dsn, array() );
if (PEAR::isError($db)) { die($db->getMessage()); }
$res = $db->query( “SELECT name FROM users WHERE id=?”,
array( $_SESSION[‘user’] ) );
$res->fetchInto( $row );
// filename: upload.success.php
?><!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”
“http://www.w3.org/TR/html4/strict.dtd”>
<html lang=”en”>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=iso-8859-1″>
<link rel=”stylesheet” type=”text/css” href=”stylesheet.css”>
<title>Successful upload</title>
</head>
<body>
<div id=”Upload”>
<h1>File upload</h1>
<p>Congratulations! Your file upload was successful!</p>
<?php header( ” Location: ../main.page.php” );?>
</div>
</body>
</html>
Any suggestions?
Thanks in advance.
Warning: Cannot modify header information – headers already sent by (output started at /home/hrpjeff/public_html/uploader/upload.success.php:41) in /home/hrpjeff/public_html/uploader/upload.success.php on line 42