PHP Project-10 :Form Validation (By Using Dreamweaver)

Posted: November 13, 2010 in DreamWeaver, HTML, PHP
Tags: , ,

1.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>

2. Select Form tag

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

 

3. 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”

 

4. 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.

 

5. Test in your web browser

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s