reecieboy Posted April 9, 2006 Share Posted April 9, 2006 Whats wrong with the above?Problem with query: UPDATE users SET sessionid=27768e4a7b8a093671bf7c4f1e883ed9 WHERE userid=userYou have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'a7b8a093671bf7c4f1e883ed9 WHERE userid=user' at line 1 Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 9, 2006 Share Posted April 9, 2006 You need to surround any text with single quotes:[code]<?php$q = "UPDATE users SET sessionid='".session_id()."' WHERE userid='".$_POST['username'] . "'";?>[/code]Ken 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.