barnes Posted April 26, 2007 Share Posted April 26, 2007 Parse error: parse error in c:\easyphp1-8\www\login.php on line 26 i unable to find this error. login.php <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("user",$con); $username=mysql_real_escape_string($_POST['name']); $pwd=mysql_real_escape_string($_POST['pwd']); if(isset($_POST['name'])) { $q1 = "select username,password from user where username='$username'"; $r1 = mysql_query($q1,$con) or die(mysql_error()); while($res=mysql_fetch_array($r1)) { if($res['password']==$pwd); { echo "your registered sucessfully"; } else { echo "please register"; } } } mysql_close($con) ?> Link to comment https://forums.phpfreaks.com/topic/48769-error-rectification/ Share on other sites More sharing options...
taith Posted April 26, 2007 Share Posted April 26, 2007 missing a ; at the end ;-) <?php $con = mysql_connect("localhost","root",""); if(!$con) die('Could not connect: ' . mysql_error()); mysql_select_db("user",$con); $username=mysql_real_escape_string($_POST['name']); $pwd=mysql_real_escape_string($_POST['pwd']); if(isset($_POST['name'])){ $r1=mysql_query("SELECT username,password FROM `user` WHERE `username`='$username'") or die(mysql_error()); while($res=mysql_fetch_array($r1)){ if($res['password']==$pwd){ echo "your registered sucessfully"; }else{ echo "please register"; } } } mysql_close($con); ?> Link to comment https://forums.phpfreaks.com/topic/48769-error-rectification/#findComment-239002 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.