Rifts Posted August 31, 2010 Share Posted August 31, 2010 i have this code <?php require_once('dbconnect.php') $user = "test"; $pass = "test"; $result=mysql_query("SELECT * FROM accounts WHERE user = '$user' AND pass = '$pass' "); if(mysql_num_rows($result) == 0) { $login = "&err=Login Failed."; echo($login); } else { $row = mysql_fetch_array($result); $user = $row['user']; $pass = $row['pass']; $login = "&user=".$user."&pass=".$pass."&err=Login Successful."; echo($login); } ?> and im getting this Parse error: parse error in C:\wamp\www\flashstuff\WTF.php on line 4 line 4 is: $user = "test"; all the dbconnect stuff is fine help! Link to comment https://forums.phpfreaks.com/topic/212141-driving-me-nuts-simple-parse-error/ Share on other sites More sharing options...
trq Posted August 31, 2010 Share Posted August 31, 2010 Missing a ; on... require_once('dbconnect.php') Also, require_once does not require brackets. (Not that it will cause an error) require_once 'dbconnect.php'; Link to comment https://forums.phpfreaks.com/topic/212141-driving-me-nuts-simple-parse-error/#findComment-1105479 Share on other sites More sharing options...
Rifts Posted August 31, 2010 Author Share Posted August 31, 2010 lol WOW i guess i'm tried lol thanks Link to comment https://forums.phpfreaks.com/topic/212141-driving-me-nuts-simple-parse-error/#findComment-1105497 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.