I have managed to create this simple form, how do I parse info the user clicks on.
<form id='sampleform' method='post' action='myurl.com' >
Name: <input type='text' name='Name' />
Email: <input type='text' name='Email' />
<input type="radio" name="subject" value="maths" /> £10
<input type="radio" name="subject" value="physics" /> £5
<input type="radio" name="subject" value="physics" /> £3
£<input type='text' name='donate-amount' />
<input type='submit' name='Submit' value='Submit' />
I just want to suggest a small correction. In your form use a file name in the action. Right now you have used myurl.com instead of that use file name for example output.php, so that after the form is submitted it will go to output.php where you can process the form.
I usually process the posted variables in the same script, I would remove you're action from the form tag (leave it blank). then put this at the top of the page to visualize what you just posted.
echo'<pre>'; print_r($_POST); echo '</pre>';
Now you will have variables to play with.
That's how you get your POST'ed variables.
This topic is now closed. New replies are no longer allowed.