Jump to content

Validation Script?


Antec

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.