odetron Posted November 23, 2006 Share Posted November 23, 2006 yeah, im lousy at php. anyways whats wrong this code? I can't seem to fix it.[code]if (mysql_num_rows($result)!= 1) {$error = “Bad Login”; include “login.html”;} else { $_SESSION[‘username’] = “$username”; include “memberspage.php”;}?>[/code]Theres an unexpected T-String in the top row. Quote Link to comment Share on other sites More sharing options...
ataria Posted November 23, 2006 Share Posted November 23, 2006 Hmm. I wouldn't code it in that way...[code]$result_count = mysql_num_rows($result);if ($result_count == '0') {echo "Bag Login.";include ("login.html");}[/code]I don't know about the 2nd half.. I use cookies, I never use sessions... but, it doesn't look correct. Quote Link to comment Share on other sites More sharing options...
fert Posted November 23, 2006 Share Posted November 23, 2006 Try[code]$_SESSION[username]=$username;[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.