Tuesday 16 December 2014

PHP Form Validation Using Dreamweaver CS5

php form validation using dreamweaver cs5

In this tutorial shows you how to validate form using Macromedia Dreamweaver, it will show alert box when someone press submit button and forgot to fill your required fields.
php form validation using dreamweaver cs5
 STEP1: Open Dreamweaver and create singup form

############### Code



<table width="350" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><form action="" method="post" name="form1">
<table width="350" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="105">Full Name</td>
<td width="16">:</td>
<td width="222"><input name="fullname" type="text" id="fullname">
* </td>
</tr>
<tr>
<td>E-mail</td>
<td>:</td>
<td><input name="email" type="text" id="email">
* </td>
</tr>
<tr>
<td>Phone number </td>
<td>:</td>
<td><input name="phone_number" type="text" id="phone_number">
* </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Submit">
</td>
</tr>
</table>
</form></td>
</tr>
</table>

STEP2: Select Form Tag

Click on table and you will see form tag appeared then click to select it

STEP3: Open tag inspector panel (Press F9)

At your panel bar open your tag inspector panel (press F9 or window > Tag Inapector)
Select tab "Behaviors"
Select onSubmit
Click on a plus sign then select "Validate Form"

STEP4: Validate form

In this step in Name fields box select what field you don't want to be blank then tick "Required" and choose what you accept.

STEP5: Test in web browser

Press submit button without insert any value in form fields you will see this alert box.

0 comments:

Post a Comment

 
Copyright © 2015. Free IT Codes | IT Projects . All Rights Reserved
Home | Company Info | Contact Us | Privacy policy | Term of use | Widget | Site map
Design by Herdiansyah . Published by Borneo Templates