ret

<div><script type=”text/javascript”>// <![CDATA[
function validateForm()
{
/* Validating name field */
var x=document.forms[“myForm”][“name”].value;
if (x==null || x==””)
{
alert(“Name must be filled out”);
return false;
}
/* Validating email field */
var x=document.forms[“myForm”][“email”].value;
var atpos=x.indexOf(“@”);
var dotpos=x.lastIndexOf(“.”);
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
{
alert(“Not a valid e-mail address”);
return false;
}
}
// ]]></script><form action=”../process.php” method=”post” name=”myForm”>
<table>
<tbody>
<tr>
<td><strong>Name</strong></td>
<td><input id=”name” name=”name” type=”text” /></td>
</tr>
<tr>
<td><strong>Email</strong></td>
<td><input id=”email” name=”email” type=”text” /></td>
</tr>
<tr>
<td><strong>Product Name</strong></td>
<td><input id=”pname” name=”pname” type=”text” /></td>
</tr>
<tr>
<td><strong>Upload Image</strong></td>
<td><input accept=”image/*” name=”pic” type=”file” /></td>
</tr>
<tr>
<td></td>
<td><input type=”submit” value=”Submit” /></td>
</tr>
</tbody>
</table>
</form></div>