Reply to Cannot modify header information - headers

Your name:

Reply:


Posted by vncntj on 07/16/07 20:33

I keep getting:

Warning: Cannot modify header information - headers already sent by
(output started at /home/blah/public_html/site/final/login.php:17) in /
home/blah/public_html/site/final/login.php on line 33. I went through
and removed all of the whitespaces!
:(

<?php
require_once('blah_class.php');
?>
<html>
<head>
<title>WTW</title>
</head>
<body>
<table width="95%" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td height="500" valign="top" background="images/cc_bg.gif">
Please Login
<form action="login.php" method="post">
<input type=text name=login size=20 maxlength=40><br />
<input type=password name=password size=20 maxlength=20><br />
<input type=submit name=submit value=Login><br />
<input type=hidden name=submitted value=TRUE>
</form>
</td>
</tr>
</table>
<?php
if (isset($_POST['submitted'])) {
$db = new db_class;
$l = $_POST['login'];
$p = $_POST['password'];
if (!$db->connect($this->host, $this->user, $this->pw, $this->db,
true))
$db->print_last_error(false);
$r = $db->select("Select login from blah_table Where login='$l' AND
password='$p'");
if(@mysql_num_rows($r) == 1)
{
while ($row=$db->get_row($r, 'MYSQL_ASSOC')) {
header("Location:test.htm");
}
}
else {
echo "No match";
}
}
?>
</body>
</html>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация