2011年4月23日土曜日

HTML tips

I have to create a contact page using PHP. My site has a form to fill out. After finishing filling out the form and click OK, the page will be forwarded to a confirmation page. Finally,after confirming the content of the form,email will be sent to the client.
Some problems appear when i start coding.
1. How to maintain the condition of radio,textarea ....
2. How to keep the content of this form when the email script is called.Or how to hand the variables from input page to mail page.
Tips :
1. HTML input has some attributes like readonly,disable or checked.
Example: Textarea
<textarea name="content" cols="50" rows="10" ><? echo $_POST["content"]?></textarea>

2. We use the hidden type of input and put them into a form. When mail script is called, the hidden-type stored variables from confirmation page will be transfered to mail script program.