Re: Problem with Header()
| From: | gstrein andreas | Date: | Thu, 10 Aug 2000 18:40:57 +0000 |
| Subject: | Re: Problem with Header() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-11198@lists.php.net to get a copy of this message | ||
hi,
try it this way
<html>
<?
$server="localhost";
$username="username";
$password="pass";
$database="database";
$table="table";
@mysql_connect($server, $username, $password) or die("Connection");
@mysql_select_db($database) or die("Database");
?>
<?
if ($id) {
header("Location: http://www.domain.com/");
exit;
} else {
$Result=@mysql_query("SELECT * FROM $table WHERE id=$id");
while($row = @mysql_fetch_array($Result))
$title = $row["title"];
echo "<head>
<title>$title</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<style type='text/css'>
<!--
FORM { margin: 0px 0px}
-->
</style>
</head>";
}
?>
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/_/ viva technologies
_/ gstrein andreas
"Always listen to the experts; they'll tell you what can't be done and why.
Then do it."
- Robert A. Heinlein