Dethman Posted April 1, 2008 Share Posted April 1, 2008 Hello Im trying to Call this: if (isset($_POST['mypath'])) { $choice = $_POST['loyalty_choice']; $sql = "UPDATE `user_users` SET `loyalty` = '$choice' WHERE `userid` = '{$user['userid']}'"; header ('Location: worship.php?str=Your Path Has Been Chosen!'); } When you use this: <form name="loyalty" action="" method="post"> <select name="loyalty_choice"> <option value="0" selected >Choose Your Path</option> <option value="1" >Chaos</option> <option value="2" >Order</option> <option value="3" >Life</option> <option value="4" >Death</option> </select> <input type="submit" name="mypath" value="Worship This Caste!"> </form> It dosnt update the SQL DB Link to comment https://forums.phpfreaks.com/topic/98954-calling-this/ Share on other sites More sharing options...
rajivgonsalves Posted April 1, 2008 Share Posted April 1, 2008 you forgot mysql_query this $sql = "UPDATE `user_users` SET `loyalty` = '$choice' WHERE `userid` = '{$user['userid']}'"; should be $sql = "UPDATE `user_users` SET `loyalty` = '$choice' WHERE `userid` = '{$user['userid']}'"; mysql_query($sql) or die("Cannot Execute:".mysql_error()); Link to comment https://forums.phpfreaks.com/topic/98954-calling-this/#findComment-506318 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.