PDA

View Full Version : Please kindly with this code



liz
05-30-2007, 02:37 PM
:( How do I make sure the fields are all filled(mandatory) before submit..I am new to this...find code below
<form action="http://www.bluehost.com/bluemail" enctype="multipart/form-data" method="POST">
Name: <input type="text" name="Name"><br>
Email: <input type="text" name="mailfrom"><br>
My story: <textarea name="comments"></textarea><br>
<input type="hidden" name="sendtoemail" value="xxx@raaaaa.com"><br>
<input type="submit" value="Send"><input type="reset" value="Reset" name="B2"></p>

</form>

comperr
05-30-2007, 08:24 PM
http://www.yourhtmlsource.com/javascript/formvalidation.html
is a simple tutorial to validating your form.
Alt. you can use simple PHP
psudo code
for I = 1 to 6
if ($_post[i]=='')
ERROR
else
OK
end if
end loop