i get the following error:PHP Code:<?php
$var=$_POST['username'];
$pass=md5($_POST['password']);
$passwor=$pass;
/* Connect to the MySQL database */
$db_connection = mysql_connect("localhost", "yyyy", "xxxx")
or die("Could not connect to DB");
/* Select the MasteringPHP database */
mysql_select_db ("student", $db_connection)
or die("Could not find DB");
/* Store the query to be executed in a variable */
$query1 = "SELECT DISTINCT firstname,
lastname
FROM teachers
WHERE username='$var' AND password='$pass';
/* Send the query to MySQL for execution */
$query_result = mysql_query ($query1, $db_connection) or die(mysql_error());
if(@mysql_num_rows($query_result)==0)
{
print "please check your username and password"; //line 29
include "tchrs_login.php";
// exit();
}
//include "tchrs_choice.php";
?>
Parse error: parse error in C:\Program Files\Apache Group\Apache2\htdocs\student\tchrs_authentication.php on line 29
note that i have commented line 29







Bookmarks