aconite Posted March 21, 2007 Share Posted March 21, 2007 im making a php form.the information entered is used to populate two tables.my form works fine.i wanted to know how could apply certain restriction to the form data(like fields that are mandatory).and also can i set the data type allowed to integer only?and also entry format (like xx-xxxx-xxxxxx).also are there any formating options for the form fields other than center,left,right currently im using this code <html> <body BGCOLOR="#FFCC66"><form action="success.php" method="post"> <P align="center"> <FONT FACE="Times New Roman" SIZE="+1" COLOR="#CC6600">ADD CUSTOMER <br> <br> First Name: <input type="text" name="fname" maxlength='15'/> Last Name: <input type="text" name="lname" maxlength='15'/> Phone#:<input type="text" name="fone" maxlength='11'/> NIC:<input type="text" name="nic" maxlength='20'/> <input type="submit" value="Add Customer and account info"/> </form></body> </html> Link to comment https://forums.phpfreaks.com/topic/43706-detailed-attributes-of-php-forms/ Share on other sites More sharing options...
kenrbnsn Posted March 21, 2007 Share Posted March 21, 2007 You will need to use Javascript to control inputs on a form. PHP runs on the server and doesn't know or care what the client is doing. Ken Link to comment https://forums.phpfreaks.com/topic/43706-detailed-attributes-of-php-forms/#findComment-212190 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.