Question:
how do you process a submitted form in xhtml?
anonymous
2009-10-09 20:01:34 UTC
hi everyone.

i am studying xhtml and css.

i do not understand where does the information a person writes in a form go when they click the button that send the information away for processing?

could some one help me understand how one would achieve this for making a web site?

thanks for any help

pete
Five answers:
anonymous
2009-10-09 22:17:36 UTC
Use a server-side script language if your web site allows it. Otherwise, you will have to use a client-side dependent "mailto:" action to get the form info sent to you.



Your current hosting package MUST allow SMTP ( http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol ) to work. Otherwise, no email can be sent.



Use any of the below sites to make the workable form you need:



For making forms:



These are really good online form makers. Just follow the instructions for making it and uploading file(s).



http://www.phpform.org/ (Best-est)

http://www.tele-pro.co.uk/scripts/contact_form/

http://jotform.com/ (WYSIWYG Form Maker)

http://www.thesitewizard.com/wizards/feedbackform.shtml

http://www.thepcmanwebsite.com/form_mail.shtml
Will
2009-10-10 19:44:24 UTC
You use PHP. mysql_db_connect(hostname, username, password) to connect to your database, mysql_db_select(hostname, username, password) to select your database, and then you'd use SQL queries to post all the information. Use an if statement to give a customized error message in case the information doesn't post. This is a little more difficult than XHTML and CSS but not too bad. I think before you begin learning PHP, ASP.NET, Ruby, or any other server side language, you should finish learning XHTML and CSS.



-Billy
Ben
2009-10-10 03:07:44 UTC
You need a web server with a custom backend- you can't do it in just HTML and CSS. You need something like Ruby on Rails, PHP, or Python/Django to handle the processing. Basically, the submit button sends a POST request to the server with all the data and the server-side program takes that data and analyzes it, like putting it in a database or running a transaction.
anonymous
2009-10-10 03:31:03 UTC
For processing a form, you will need a server-side scripting language such as PHP or ASP.NET. I recommend learning PHP, because it works in conjunction with XHTML and CSS, and has much more features than ASP.NET. Also, it's easy to set up a database with PHP.



So on a PHP page, you just retrieve the information by using the variable:



$_POST['name of variable here'];
anonymous
2009-10-10 03:04:43 UTC
You don't.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...