I've been studying html.. I'm currently looking at different kinds of forms. Where does the data of the results go? eg. If you add a radio button for example asking whether someone is male or female, where does the data go and how do you use it if you add it to a webpage? http://www.w3schools.com/html/html_forms.asp
The data is posted to the destination defined in the action attribute. You'll then use a server-side scripting language to retrieve the posted data in the destination page. You will need a server with php to try the following example: form.htm <form action="script.php" method="post"> <input type="radio" name="sex" id="male" value="male" /> <label for="male">Male</label> <input type="radio" name="sex" id="female" value="female" /> <label for="female">Female</label> <input type="submit" name="submit_sex" value="Send!" /> </form> Code (markup): script.php <?php echo "You are " . $_POST['sex']; ?> PHP:
Thanks that works. but there's no way I'm going to learn that php though. It's strange w3schools teaches how to use forms, but they're quite useless without the php to use the data??
Yes, HTML is useless without php. HTML froms can use mail.pl or mail.cgi to send the data that is filled straight into your email box. If is anything I can help you, add me on YM: netxme
There are surely scripts floating around out there that people can use. I'm sure you're not the only one who needs a form to work without learning a programming language.
I must point out however, that the way this form has been coded will render it inaccessible to people who rely on the keyboard for navigation as well as those who require the use of an assistive device. In the case of checkboxes and radio inputs, the input must be wrapped inside the label, with the input coming first, followed by the label text. Here's an example of a properly coded form (note that it doens't do anything since it's not tied to a back-end script). http://www.dan-schulz.com/temp/css-form-example/
Dan, the inputs Can't be wrapped in the label for Window Eyes (and then so, who else?). It ignores either the label or the input, I forget who. Also, form writers need to be able to determine which comes first, the label or the input. If they both have an id, they should still be accessible and on most browsers the label is still clickable too isn't it? Ah, found it. http://green-beast.com/blog/?p=254
Damn. Forgot that affected checkboxes/radio inputs too. Oh well. Simon told me that he's fired off an email to the developers of Windows Eyes (and filed some bug reports) so this should be fixed fairly soon (I hope).
But... is it only Window Eyes? Are there other, maybe less common screen readers with the same issue??
A recommendation, I would say use wufoo forms. There free for 3 forms and they look great. You can get the results to your email or phone.
You will need server-side language to retrieve data from form and do something with them. I suggest you learn PHP. It's free, fast, reliable and easy to learn (syntax almost same as c/c++ so if you already know little bit of those, you can start coding PHP right now). If you don't have experiences with PHP (or c/c++)... don't worry... scripts for handling form data are very easy - moreover you can find tons of free scripts all over the internet.