<html>
<head>
<title>Add Supplier</title>
<link href="css/addsupplier.css" rel="stylesheet" type="text/css">
<?php require('../includes/_header.php'); ?>
<script type="text/javascript" src="addsupplier.js"> </script>
</head>
<body>
<h2>Add Supplier</h2>
<?php require_once("../includes/navigation.php") ?>
<div id="d1">
<center>
<fieldset>
<center>
<form method="post" id="form" action="addsupplier.php" >
<frameset>
<table>
<tr height=60>
<td >Company name</td>
<td><input type="text" id="cname" name="cname" autocomplete="off"></td>
</tr>
<tr height=60>
<td>Address </td>.
<td><input type="text" id="add" name="add" autocomplete="off"></td>
</tr>
<tr height=60>
<td>Land number </td>
<td><input type="text" id="lno" name="lno" autocomplete="off"></td>
</tr>
<tr height=60>
<td>Mobile number </td>
<td><input type="text" id="mno" name="mno" autocomplete="off"></td>
</tr>
<tr height=60>
<td>Email </td>
<td><input type="text" id="mail" name="mail" autocomplete="off"></td>
</tr>
<tr height=60>
<td>Fax </td>
<td><input type="text" id="fax" name="fax" autocomplete="off"></td>
</tr>
</table>
<input id="i1" type="submit" name="go" value="Add">
</form>
</center>
</fieldset>
</center>
</div>
<?php require_once('../includes/_footer.php') ?>
</body>
</html>
$(document).ready(function(){
$("#form").validate({
rules:{
cname:"required",
add:"required",
lno:{
required:true,
number:true,
maxlength:10,
},
mno:{
required:true,
number:true,
maxlength:10
},
mail:{
email:true
},
fax:{
number:true
},
},
messages:{
cname:"Please enter company name",
add:"Please enter address",
lno:{
required:"Enter a land number",
number:"Entered number is wrong",
maxlength:"Please enter a valid number",
},
mno:{
required:"Enter a land number",
number:"Entered number is wrong",
maxlength:"Please enter a valid number",
},
mail:{
email:"Please enter a valid email",
},
fax:{
number:"Please enter a valid fax ",
},
},
submitHandler: function(form) {
form.submit();
}
});
});