Antec Posted June 3, 2007 Share Posted June 3, 2007 Ok, i know nothing about javascripting lol but i need someone's help in creating a validation script for a form i have...the script would need to validate a text field, email field and require the checkbox be checked off in order to submit the form, and if there is any errors i would like it to pop-up a little window with the error message...here is the coding it needs to go into...i thank anyone in advanced that can help me. /* BEGINS for JoinUS */ if($_GET['view'] == "JoinUs") { require("functions.php"); $query = @mysql_query("SELECT recruiting, security_status, total FROM status"); $row_status = mysql_fetch_array($query); if($row_status['total'] >= 350 || $row_status['recruiting'] == 1) { echo' <font color="#76A5D5" size="4" face="verdana"><b>Recruiting Is Closed!</b></font>'; } else { echo ' <form method="post" name="JoinRequest" action="sendit.php">'; $ipi = getenv("REMOTE_ADDR"); $httprefi = getenv ("HTTP_REFERER"); $httpagenti = getenv ("HTTP_USER_AGENT"); ?> <input type="hidden" name="ip" value="<?php echo $ipi ?>"/> <input type="hidden" name="httpref" value="<?php echo $httprefi ?>"/> <input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>"/> <br /> <b><font color="#76A5D5" size="2" face="verdana">Socom Name: </font></b> <input name="visitor" type="text" id="visitor" size="35"/> <br /> <br /> <b><font color="#76A5D5" size="2" face="verdana">Email Address:</font></b> <input type="text" name="visitormail" size="35"/> <br /> <br /> <b><font color="#76A5D5" size="2" face="verdana">Version Trying For:</font></b> <select name="attn" size="1"> <option value=" Socom1 ">Socom </option> <option value=" Socom2 ">Socom 2 </option> <option value=" Socom3 ">Socom 3 </option> <option value=" Socom4 ">Combined Assult </option> </select> <br /><br /> <input type="checkbox" name="notes" value="checkbox"/> <font color="#76A5D5" size="1" face="verdana">I Have Read And Agree To Follow The <strong><a href="index.php?view=Rules">Clan Rules</font></a></strong><br /> <br /> <input type="submit" value="Submit" name="submit_button"> </form> <font color="#FF0000">**</font><font color="#76A5D5" size="1" face="verdana">All Applications will be reviewed in a timely manner. Any questions or concerns belong on our <b><a href="forum/index.php">Forum</a></b></font><br /> <br /> <?php } include('footer.php'); } /* ENDS for HowTojoin */ Link to comment https://forums.phpfreaks.com/topic/54088-validation-script/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.