Online
 
Friday, 09 January 2009
 
 
More article:
Related Content:

Form Processing
 
Article Index
Form Processing
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8
Page 9

<HTML>
<HEAD><TITLE>Form Validation Example</TITLE></HEAD>
<BODY>
<?php
/* Display any errors that occurred during validation */

if($form_errorlist): ?>
Please correct the following errors:<BR>
<UL>
<?php foreach($form_errors as $val): ?>
<LI><?=$val?>
<?php endforeach; ?>
</UL>
<?php endif; ?>
<FORM ACTION="<?php echo $_SERVER['PHP_SELF']; ?>" METHOD=GET>
<INPUT TYPE="hidden" NAME="required" VALUE="first,last,email">
<INPUT TYPE="hidden" NAME="submit" VALUE="1">
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD COLSPAN=2>Please fill out the following fields. (* = Required)</TD>
</TR>
<TR>
<TD>*First Name:</TD>
<TD><INPUT TYPE="text" NAME="first"
VALUE="<?php echo @$method['first']; ?>">
<INPUT TYPE="hidden" NAME="first_desc" VALUE="First name"></TD>
</TR>
<TR>
<TD>*Last Name:</TD>
<TD><INPUT TYPE="text" NAME="last" VALUE="<?php echo @$method['last']; ?>">
<INPUT TYPE="hidden" NAME="last_desc" VALUE="Last name"></TD>
</TR>
<TR>
<TD>Phone Number:</TD>
<TD><INPUT TYPE="text" NAME="phone"
VALUE="<?php echo @$method['phone']; ?>">
<INPUT TYPE="hidden" NAME="phone_desc" VALUE="Phone number"></TD>
</TR>
<TR>
<TD>*E-mail:</TD>
<TD><INPUT TYPE="text" NAME="email"
VALUE="<?php echo @$method['email']; ?>">
<INPUT TYPE="hidden" NAME="email_desc" VALUE="E-mail address"></TD>
</TR>
<TR>
<TD COLSPAN=2><INPUT TYPE="submit" VALUE="Send"></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>


Tags: Add more tags...,
This entry was posted on . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a comment. Tags: Simple PHP, Pear, Easy PHP, PHP Tutorial, PHP MySQL, XSLT, Sap Tutorial, CSS Tutorial, XSL FO Java, SQL Tutorial.
Users' Comments (0)

Comment an article
  Name
  E-mail
   Title
Available characters: 4000
 Notify me of follow-up comments
This image contains a scrambled text, it is using a combination of colors, font size, background, angle in order to disallow computer to automate reading. You will have to reproduce it to post on my homepage
Enter what you see:

No comment posted

Wallpaper 54
Statistic


Last Post

 
Top! Top!