<FORM method="post" action="index.php?a=5">
<TABLE border="1" bgcolor="#800000">
<tr>
<td width="20%" class="head">
Username: *
</td>
<td width="40%" class="even">
<INPUT type="text" name="username" value="<?php print($username); ?>" >
</td>
<td class="com">
<b>$a->set_operations("Username",$username,0,3,5,">",5);</b><br/>
<ul>
<li>0:--Not Empty</li>
<li>3:--Has to be Letter</li>
<li>5,">",5:--Can not be longer than 5 Letters</li>
</ul>
</td>
</tr>
<tr>
<td class="head">
Password: *
</td>
<td class="even">
<INPUT type="password" name="password" value="<?php print($password); ?>" >
</td>
<td class="com">
<b>$a->set_operations("Password",$password,0);</b><br/>
<ul>
<li>0:--Not Empty </li>
</ul>
<hr>
<b>$a->set_operations("Password and Again Password",$password,$password1,2);</b><br/>
<ul>
<li>2:--Has to be same like Again Password</li>
</ul>
</td>
</tr>
<tr>
<td class="head">
Again Password: *
</td>
<td class="even">
<INPUT type="password" name="password1" value="<?php print($password1); ?>" >
</td>
<td class="com">
<b>$a->set_operations("Again Password",$password1,0);</b> <br/>
<ul>
<li>0:--Not empty </li>
</ul>
<hr>
<b>$a->set_operations("Password and Again Password",$password,$password1,2);</b><br/>
<ul>
<li>2:--Has to be same like Again Password</li>
</ul>
</td>
</tr>
<tr>
<td class="head">
Email: *
</td>
<td class="even">
<INPUT type="text" name="email" value="<?php print($email); ?>" >
</td>
<td class="com">
<b>$a->set_operations("E mail",$email,0,1);</b><br/>
<ul>
<li>0:--Not Empty</li>
<li>1:--E - mail has to be entered on appropriate way</li>
</ul>
</td>
</tr>
<tr>
<td class="head">
Age: *
</td>
<td class="even">
<INPUT type="text" name="age" value="<?php print($age); ?>" >
</td>
<td class="com">
<b>$a->set_operations("age",$age ,0,4,5,">",2);</b><br/>
<ul>
<li>0:--Not Empty</li>
<li>4:--Just Numbers</li>
<li>5,">",2:--No Longer then 2 numbers</li>
</ul>
</td>
</tr>
<tr>
<td class="head">
Screen Name: *
</td>
<td class="even">
<INPUT type="text" name="screen" value="<?php print($screen); ?>" >
</td>
<td class="com">
<b>$a->set_operations("Screen Name",$screen,0,3,5,"<",5);</b><br/>
<ul>
<li>0:--Not Empty</li>
<li>4:--Just Letters </li>
<li>5,"<",5:--Longer then 5 letters</li>
</ul>
</td>
</tr>
<tr>
<td class="head">
Some Number:
</td>
<td class="even">
<INPUT type="text" name="number" value="<?php print($number); ?>" >
</td>
<td class="com">
<b>$a->set_operations("Some Number",$number,5,"=",10);</b><br/>
<ul>
<li>5,"=",10:--Can not be 10</li>
</ul>
</td>
</tr>
<tr>
<td class="head">
Sex: *
</td>
<td class="even">
Man:
<input type="checkbox" name="C1" value="Man">
Woman:
<input type="checkbox" name="C2" value="Woman">
Not Defined:
<input type="checkbox" name="C3" value="NoD">
</td>
<td class="com">
<b>$a->val_arr[0]=$C1;</b><br/>
<b>$a->val_arr[1]=$C2;</b><br/>
<b>$a->val_arr[2]=$C3;</b><br/>
<ul>
<li>We are entering tree elements which we want to validate</li>
</ul>
<b>$a->set_operations("Sex",$a->val_arr,6,1);</b><br/><br/>
<ul>
<li>6: One of this three elements has to be selected</li>
<li>1: Only one of this three elements can be selected</li>
</ul>
</td>
</tr>
<tr>
<td class="head">
Industry: *
</td>
<td class="even">
<select size="1" name="Industry">
<option value="">--Select--</option>
<option value="It">It</option>
<option value="Economics">Economics</option>
</select>
</td>
<td class="com">
<b>$a->set_operations("Industry", Industry ,0);></b><br/>
<ul>
<li>0:--Something has to be selected</li>
</ul>
</td>
</tr>
<tr>
<td class="head">
Yes/No: *
</td>
<td class="even">
Yes<input type="radio" value="V1" name="R1" >
No<input type="radio" value="V2" name="R1" >
</td>
<td class="com">
<b>$a->set_operations("Yes/No",$R1,0);</b><br/>
<ul>
<li>0:--Something has to be selected</li>
</ul>
</td>
</tr>
<tr>
<td class="head">
Country: *
</td>
<td class="even">
<select size="3" name="D1">
<option value="aaa">Country1</option>
<option value="bbb">Country2</option>
<option value="ccc">Country3</option>
<option value="ddd">Country4</option>
<option value="eee">Country5</option>
</select>
</td>
<td class="com">
<b>$a->set_operations("Country",$D1,0);</b><br/>
<ul>
<li>0:--Something has to be selected</li>
</ul>
</td>
</tr>
<tr>
<td class="com" colspan="3">
<INPUT type="submit" value=insert name=insert>
</td>
</tr>
</TABLE>
</FORM>
|