Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub verifyform
- {
- $missing = 0;
- foreach (keys %form)
- {
- if ($form{$_} eq"")
- {
- $errormsg = "Please enter data for req field";
- $missing = 1; ## if missing data, set missing flag to 1
- }
- else
- {
- $errormsg="";
- }
- $errors{$_}=$errormsg; ##Load the %errors hash wiht error message
- }
- if ($missing == 1 )
- {
- &displayform;
- exit;
- }
- }
- #edit displayform subroutine
- Last Name: <input type=text name=lname>
- #Bcomes
- Last Name: <input type=text name=lname value="$form{lname}"> $errors{lname}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement