|  | Posted by  vncntj on 07/21/07 13:56 
I went through and removed the HTML tags, but I'm still getting theerror:
 
 "Warning: Cannot modify header information"
 
 
 <?php
 require_once('christchurch_class.php');
 echo '<title>Login</title>';
 echo '<body>';
 echo '<table width=95%  border=0 align=center cellpadding=0
 cellspacing=0>';
 echo '<tr>';
 echo '<td height=500 valign=top background=images/cc_bg.gif>';
 echo 'Please Login';
 echo '<form action=login1.php method=post>';
 echo '<input type=text name=login size=20 maxlength=40><br />';
 echo '<input type=password name=password size=20 maxlength=20><br /
 >';
 echo '<input type=submit name=submit value=Login><br />';
 echo '<input type=hidden name=submitted value=TRUE>';
 echo '</form>';
 echo '</td>';
 echo '</tr>';
 echo '</table>';
 echo '</body>';
 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";
 
 }
 }
 
 ?>
 [Back to original message] |