phpwiz Posted August 18, 2009 Share Posted August 18, 2009 ok i am making a styleswitcher script where the user has the option to change the style of the site i was thinking of making a field in the users table called "style" and like 1 for green 2 for red 3 for blue... and have variables in my script $green = mysql_query("UPDATE users SET `style`='1' WHERE `style`='$id' "); or something like that and i am TOTALLY STUCK! can someone please help!!!!! Quote Link to comment https://forums.phpfreaks.com/topic/170784-style-switcher/ Share on other sites More sharing options...
Daniel0 Posted August 18, 2009 Share Posted August 18, 2009 You'd probably want to do: UPDATE users SET style = $styleId WHERE user_id = $userId Assuming of course that the user's ID is called user_id in the table and that you have two variables holding integers called $styleId and $userId. Quote Link to comment https://forums.phpfreaks.com/topic/170784-style-switcher/#findComment-900714 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.