megamanhero Posted September 5, 2006 Share Posted September 5, 2006 UPDATE Users SET Rank = 'Form_Variable' WHERE Rank = 'form_variable' AND User = 'Form_variable' does anyone know how to use a form to be submitted to create a variable for the above Quote Link to comment Share on other sites More sharing options...
shocker-z Posted September 5, 2006 Share Posted September 5, 2006 well if form uses method="post" then it's $_POST['form_variable_name_here'] if it's method="get" then it's $_GET['form_variable_name_here']... what you also need to do it make an effort to stop someone SQL injecting your page so your could should be like this..$variablename=mysql_real_escape_string($_POST['variablename']);UPDATE Users SET Rank = 'Form_Variable' WHERE Rank = 'form_variable' AND User = '$variablename'regardsLiam Quote Link to comment Share on other sites More sharing options...
megamanhero Posted September 5, 2006 Author Share Posted September 5, 2006 Thanx for the help 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.