All PHP Tutorials
Ad Management
Counter
Email System
Forum and Guestbook
File Upload
Image Manipulation
Login / Members / Password
Pagination
Encode Script
Refresh / Redirection
Miscellaneous
All MySQL Tutorials
Create, Manage Database using phpMyAdmin
Connect to Database
Insert Data
Select Data
Edit Database
Update Database
Delete Database
Order Results



Home > PHP Tutorials
Form Validation Using Dreamweaver
Form Validation Using Dreamweaver
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 requied fields. 
 
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>


Select Form tag


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


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"


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.


Test in your web browser


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

Random
 
Get full web page URL from address bar
In this tutorial, you'll learn how to get current web page url from your web browser address bar using php script. 
 
 
   
Hosted by Hostgator
© PHPeasystep.com 2005-2007