alex.dinca Posted January 24, 2010 Share Posted January 24, 2010 <?php require_once("db.php") $user= $_POST['user']; $password= $_POST['parola']; $cerere="select user from cont where user='$user' and parola='$parola'"; $rezultat=mysql_query($cerere); $rand=mysql_fetch_array($rezultat); if ($rand['user']; {echo "Numele si/sau parola sunt gresite"; } esle "bla bla"; ; ?> what is wrong at line 4, i am keep getting Parse error ( Link to comment https://forums.phpfreaks.com/topic/189646-help-with-parse-error/ Share on other sites More sharing options...
DarrenReeder Posted January 24, 2010 Share Posted January 24, 2010 do you need a ; on the require_once thingy??? Link to comment https://forums.phpfreaks.com/topic/189646-help-with-parse-error/#findComment-1000888 Share on other sites More sharing options...
alex.dinca Posted January 24, 2010 Author Share Posted January 24, 2010 <?php require_once("db.php") $user= $_POST['user']; $password= $_POST['parola']; $cerere="select user from cont where user='$user' and parola='$parola'"; $rezultat=mysql_query($cerere); $rand=mysql_fetch_array($rezultat); if ($rand['user']; {echo "Numele si/sau parola sunt gresite"; } esle "bla bla"; ; ?> ok .. i have corrected require_once("db.php") to require_once("db.php"); then it said error at line 13. deleted the part with else then i got this Notice: Undefined index: parola in C:\EasyPHP5.3.0\www\login2.php on line 5 Notice: Undefined variable: parola in C:\EasyPHP5.3.0\www\login2.php on line 6 Numele si/sau parola sunt gresite Link to comment https://forums.phpfreaks.com/topic/189646-help-with-parse-error/#findComment-1000890 Share on other sites More sharing options...
seopaul Posted January 24, 2010 Share Posted January 24, 2010 <?php require_once("db.php") $user= $_POST['user']); $password= $_POST['parola']; $cerere="select user from cont where user='$user' and parola='$password'"; $rezultat=mysql_query($cerere); $rand=mysql_fetch_array($rezultat); if ($rand['user']) {echo "Numele si/sau parola sunt gresite"; } esle "bla bla"; ?> just a quick look over, but think thats all the errors edit... made a typo typing to fast... fixed now Link to comment https://forums.phpfreaks.com/topic/189646-help-with-parse-error/#findComment-1000891 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.