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. Link to comment https://forums.phpfreaks.com/topic/28181-need-help/ 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. Link to comment https://forums.phpfreaks.com/topic/28181-need-help/#findComment-128898 Share on other sites More sharing options...
fert Posted November 23, 2006 Share Posted November 23, 2006 Try[code]$_SESSION[username]=$username;[/code] Link to comment https://forums.phpfreaks.com/topic/28181-need-help/#findComment-128903 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.