Jiraiya Posted December 13, 2008 Share Posted December 13, 2008 i need help with my script. i need it to change Variable B for a logged in user if variable A is equal to 5000000 and then to update variable B the database $username = $_COOKIE['ID_my_site']; $sql = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error()); if($skill >= 5000000) { $rank = Akatsuki; } ?> Link to comment https://forums.phpfreaks.com/topic/136797-solved-help-please/ Share on other sites More sharing options...
suma237 Posted December 13, 2008 Share Posted December 13, 2008 use UPDATE statment inside if statment. Link to comment https://forums.phpfreaks.com/topic/136797-solved-help-please/#findComment-714454 Share on other sites More sharing options...
Jiraiya Posted December 13, 2008 Author Share Posted December 13, 2008 whats the update statement Link to comment https://forums.phpfreaks.com/topic/136797-solved-help-please/#findComment-714455 Share on other sites More sharing options...
Flames Posted December 13, 2008 Share Posted December 13, 2008 whys it set as solved if you have no idea what your doing, your still asking for help and really i dont want to help you, help for such a basic thing is all over the internet. Learn to search the internet for answers update sql is all over the internet on each MySQL tutorial http://www.w3schools.com/sql/sql_update.asp Link to comment https://forums.phpfreaks.com/topic/136797-solved-help-please/#findComment-714471 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.