different radio button different queries
<p>Please excuse my english i use translator.</p>

<p>Let's say i have on my website 4 radio buttons and one submit.
As nothing is selected and click submit button to display text such as "Please Choose."
Having selected the first radio button and click submit to send a query like</p>

<pre><code>mysql_query("UPDATE `users` SET `credits` = `credits` + $credits1 WHERE `username` = '$logged[username]'") or die(mysql_error());
</code></pre>

<p>Having selected the second radio button and click submit to send request </p>

<pre><code>mysql_query("UPDATE `users` SET `credits` = `credits` + $credits2 WHERE `username` = '$logged[username]'") or die(mysql_error());
</code></pre>

<p>and others by that way.</p>

<pre><code>if(isset($_POST['radio'])) {

                $choices= mysql_escape_string($_POST['choices']);

}else{
?&gt;
&lt;form method="post" action=""&gt;

&lt;input type="radio" name="choices" value="1" /&gt; Run Query 1
&lt;input type="radio" name="choices" value="2" /&gt; Run Query 2
&lt;input type="radio" name="choices" value="3" /&gt; Run Query 3

&lt;input type="submit" class="buttonsub" name="submit" value="Post"/&gt;
&lt;/form&gt;
&lt;?php } ?&gt;
</code></pre>

<p>this ?</p>
