Foser Posted November 21, 2007 Share Posted November 21, 2007 I havent coded in awhile but i checked other codes i did and seemed to work. dunno why its not working $query = "SELECT * FROM phpbb_users WHERE username == '$_POST[username]'"; $fetchy = mysql_fetch_assoc(mysql_query($query)); echo $fetchy['user_password']; ?> Quote Link to comment https://forums.phpfreaks.com/topic/78230-solved-mysql_fetch_assoc-not-working/ Share on other sites More sharing options...
Orio Posted November 21, 2007 Share Posted November 21, 2007 You are not running the query using mysql_query()... Orio. Quote Link to comment https://forums.phpfreaks.com/topic/78230-solved-mysql_fetch_assoc-not-working/#findComment-395867 Share on other sites More sharing options...
Foser Posted November 21, 2007 Author Share Posted November 21, 2007 I am on line 2 Quote Link to comment https://forums.phpfreaks.com/topic/78230-solved-mysql_fetch_assoc-not-working/#findComment-395872 Share on other sites More sharing options...
Orio Posted November 21, 2007 Share Posted November 21, 2007 Oh sorry missed that. Here's the problem: username == '$_POST[username]' Should be username = '$_POST[username]' Orio. Quote Link to comment https://forums.phpfreaks.com/topic/78230-solved-mysql_fetch_assoc-not-working/#findComment-395874 Share on other sites More sharing options...
Foser Posted November 21, 2007 Author Share Posted November 21, 2007 Yea I knew it was something stupid like that, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/78230-solved-mysql_fetch_assoc-not-working/#findComment-395877 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.