Form is one of the basic elements to make a website interactive. It is used to received information from user. The information could be comment, contact details, query, order form etc.
A simplest form application will have atleast 2 parts – the form and the form processing script.
Form is developed in HTML. If you like someone’s form or the form element then you can simply view source of the page and can copy and the form or the form element and paste it in your page. Some complex forms are developed using server side scripting language. But the output is sent to client in HTML format.
Form data is sent to server as visitor clicks the submit button. On server we have a form processing page which processes the data. The path and name of the processing page is specified in the action tag of form. We can do any processing on the data like saving it to database or simply mailed to you on your email account.
The simple and very common use of form is on “contact us” page. I had already posted script to process contact us page. You can find it at: http://techutility.blogspot.com/2008/10/php-code-to-mail-form-content.html. This script will mail all the visitor’s filled information to you. Just create a file named process.php and paste the code into it. Edit the code and add your email ID. On form put process.php in the action field.
Use small forms on your website to get visitor’s comment. Don’t forget ever to reply to their queries.
If you face any problem in implementing form then contact me.
Saturday, October 18, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment