darkfreaks Posted August 15, 2012 Share Posted August 15, 2012 i consolidated my form into one page now it isn't validating not sure where i am going wrong. <?php if (isset($_POST['submit'])){ $name="walpole-group.co.uk"; // create new GnuPG object //to = "jerry.carter@perseus-it.com"; $to= //$to="contact@ac3creative.com"; //from = "jerry.carter@perseus-it.com"; $from="contact@ac3creative.com"; /* subject */ $subject = "Walpole Group Male Application Form"; foreach($_POST as $key => $val){ $_POST[$key] = trim($val); } $comDisplay12 =(isset($_POST['radio1']) && $_POST['radio1']=="Yes" ? " Yes " : " - "); $comDisplay13 =(isset($_POST['radio2']) && $_POST['radio2']=="Yes" ? " Yes " : " - "); $comDisplay14 =(isset($_POST['radio3']) && $_POST['radio3']=="Yes" ? " Yes " : " - "); $comDisplay16 =(isset($_POST['piercings']) && $_POST['piercings']=="Yes" ? " Yes " : " - "); $comDisplay17 =(isset($_POST['tattoos']) && !empty($_POST['tattoos']) ? $_POST['tattoos'] : " - "); $comDisplay18 =(isset($_POST['checkbox']) && !empty($_POST['checkbox']) ? $_POST['checkbox'] : " - "); $comDisplay19 =(isset($_POST['checkbox2']) && !empty($_POST['checkbox2']) ? $_POST['checkbox2'] : " - "); $comDisplay20 =(isset($_POST['checkbox3']) && !empty($_POST['checkbox3']) ? $_POST['checkbox3'] : " - "); $comDisplay21 =(isset($_POST['checkbox4']) && !empty($_POST['checkbox4']) ? $_POST['checkbox4'] : " - "); $comDisplay21a =(isset($_POST['checkbox5']) && !empty($_POST['checkbox5']) ? $_POST['checkbox5'] : " - "); $comDisplay22 =(isset($_POST['checkbox6']) && !empty($_POST['checkbox6']) ? $_POST['checkbox6'] : " - "); $comDisplay23 =(isset($_POST['checkbox7']) && !empty($_POST['checkbox7']) ? $_POST['checkbox7'] : " - "); // if not empty file upload field if(!empty($_FILES['file_upload']['name'])) { $file_name = "{$_FILES['file_upload']['name']}"; $tmp_name = "{$_FILES['file_upload']['tmp_name']}"; $file_type = "{$_FILES['file_upload']['type']}"; $file_size = $_FILES['file_upload']['size']; if($file_size > 2097152){ $error="file is too large must be less than 2 megabytes";} if ($_FILES['file_upload']['error']!=0){ $error="No File Uploaded!";} //echo "Error code is: {$_FILES['file_upload']['error']}"; // get extension of file $base = basename($file_name); //$ext = substr($base,strlen($base)-4, strlen($base)); $ext = strtolower(pathinfo($base, PATHINFO_EXTENSION)); //allowed extensions $allowed_ext= array('jpeg','jpg','gif','png'); //check if allowed extension if(in_array($ext,$allowed_ext)){ }else{ $error="File Type Not Allowed!"; } }else{ $error="No File Uploaded!"; } if (!isset($error)){ $mailcontent="<table width=100% border=0 cellpadding=4 cellspacing=0>"; $mailcontent.="<tr><td valign=top><table width=710 cellpadding=0 cellspacing=0 border=0 >"; $mailcontent.="<tr><td colspan=2 ><font size=3 face=Verdana, Arial, Helvetica, sans-serif color=#FFFFFF><strong>Walpole Group Male Application Form</strong></font><br></td><td> </td></tr>"; $mailcontent.="</tr><tr><td colspan=3><hr align=center width=100% size=1 noshade color=#3C4B86></td>"; //======================model contact info======================================= $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif><b>Model's Information</b></font></td><td> </td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Stage Name:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["stageName"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>First Name:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["firstName"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Surname:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["surName"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>N I No:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["niNo"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Date of birth:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["dob"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Age:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["age"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Star sign:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["star"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Address 1:</font></td>"; $mailcontent.="<td width = 201 colspan=2><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["address1"])." </font></td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Address 2:</font></td>"; $mailcontent.="<td width = 201 colspan=2><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["address2"])." </font></td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Address 3:</font></td>"; $mailcontent.="<td width = 201 colspan=2><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["address3"])." </font></td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Town/City:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["town"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Postcode:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["postcode"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>States:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["states"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Home Telephone No:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["homeNo"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Mobile Telephone No:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["mobileNo"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Email Address:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["email"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Web Address:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["webAddress"])." </font></td><td> </td>"; //=====================model physical info======================================== $mailcontent.="</tr><tr><td colspan=3><hr align=center width=100% size=1 noshade color=#3C4B86></td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif><b>Physical Descriptions</b></font></td><td> </td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Height:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["height"])."</font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Weight:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["weight"])."</font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Suit size:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["suitSize"])."</font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Shoe size:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["shoeSize"])."</font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Chest size:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["chestSize"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Waist Size:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["waistSize"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Hip Size:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["hipSize"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Hair color:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["hairColor"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Length:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["length"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Eyes color:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["eyesColor"])." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201 valign=top> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Complexion:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["complexion"])."</font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201 valign=top> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Ethnic origin:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["ethnicOrigin"])."</font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201 valign=top> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Other info:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>Do you smoke:".$comDisplay12."<BR>Do you drink:".$comDisplay13."<BR>Do you drive:".$comDisplay14."</font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Piercings:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".$comDisplay16." </font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Tattoos:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".$comDisplay17." </font></td><td> </td>"; //======================model attributes============================================== $mailcontent.="</tr><tr><td colspan=3><hr align=center width=100% size=1 noshade color=#3C4B86></td>"; $mailcontent.="</tr><tr><td width=201 valign=top> <font size=2 face=Verdana, Arial, Helvetica, sans-serif><b>Model's attributes</b></font></td>"; $mailcontent.="</tr><tr><td width=201 valign=top> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Work undertaken</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>Fashion:".$comDisplay18."</td><td><font size=2 face=Verdana, Arial, Helvetica, sans-serif>Swimwear:".$comDisplay19."</td></font></tr> "; $mailcontent.="<tr><td> </td><td><font size=2 face=Verdana, Arial, Helvetica, sans-serif>Nude:".$comDisplay20."</font></td><td><font size=2 face=Verdana, Arial, Helvetica, sans-serif>Boy / Girl Soft:".$comDisplay21."</font></td></tr>"; $mailcontent.="<tr><Td> </td><td><font size=2 face=Verdana, Arial, Helvetica, sans-serif>Boy / Girl XXX:".$comDisplay21a."</font></td><td><font size=2 face=Verdana, Arial, Helvetica, sans-serif>Stills:".$comDisplay22."</font></td></tr>"; $mailcontent.="<tr><Td> </td><td><font size=2 face=Verdana, Arial, Helvetica, sans-serif>Video:".$comDisplay23."</font></td><td> </td></tr>"; $mailcontent.="</tr><tr><td width=201> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Previous experiences:</font></td>"; $mailcontent.="<td colspan=2 width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["experience"])." </font></td>"; $mailcontent.="</tr><tr><td width=201 valign=top> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Introduce By:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["introduceBy"])."</font></td><td> </td>"; $mailcontent.="</tr><tr><td width=201 valign=top> <font size=2 face=Verdana, Arial, Helvetica, sans-serif>Date:</font></td>"; $mailcontent.="<td width = 201><font size=2 face=Verdana, Arial, Helvetica, sans-serif>".trim($_POST["dateTime"])."</font></td><td> </td>"; //======================model related info============================================ $mailcontent.="</tr><tr><td colspan=3> </td></tr></table>"; $mail_content="<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /></head><body><center>$mailcontent</center></body></html>"; $file=$tmp_name; $content=chunk_split(base64_encode(file_get_contents($file))); $uid= md5(uniqid(time())); $headers = "From: $from". PHP_EOL; $headers .= "X-Sender: $from". PHP_EOL; $headers .= "X-Priority: 3". PHP_EOL; $headers .= "X-Mailer: php". PHP_EOL; //declarinf mutlipart boundary type $headers .= "Content-Type: multipart/mixed; boundary=\"PHP-mixed-".$uid."\"". PHP_EOL. PHP_EOL; $headers .= "this is a message in multipart MIME format.". PHP_EOL. PHP_EOL; $headers .= "--PHP-mixed-".$uid."". PHP_EOL; $headers .= "Content-Type: multipart/alternative; boundary=\"PHP-alt-".$uid."\"". PHP_EOL. PHP_EOL; $headers .= "--PHP-alt-".$uid."". PHP_EOL; $headers .= "Content-type: text/html; charset=utf-8". PHP_EOL; $headers .= "Content-Transfer-Encoding: 7bit". PHP_EOL. PHP_EOL; $headers .= "$mail_content". PHP_EOL. PHP_EOL; $headers .= "--PHP-alt-".$uid."--". PHP_EOL; //file attachment $headers .= "--PHP-mixed-".$uid."". PHP_EOL; $headers.="Content-Type:".$file_type."; name=\"".$file_name."\"". PHP_EOL; $headers.="Content-Transfer-Encoding: Base64". PHP_EOL; $headers.="Content-Disposition: attachment; filename=\"".$file_name."\"". PHP_EOL. PHP_EOL; $headers.=$content."". PHP_EOL. PHP_EOL; $headers .= "--PHP-mixed-".$uid."--"; $mail_content=""; mail($to, $subject, $mail_content, $headers); header("Location: thankyou.php"); exit; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Female Model Application Form | Walpole Models</title> <link href="../active.css" rel="stylesheet" type="text/css" /> <!--[if !IE 7]> <style type="text/css"> #wrap {display:table;height:100%} </style> <![endif]--> <script type="text/javascript" src="../inc/c_config.js"></script> <script type="text/javascript" src="../inc/c_smartmenus.js"></script> <script language="JavaScript" src="../css/script.js" type="text/JavaScript"></script> <script language="JavaScript" src="../inc/validation.js" type="text/JavaScript"></script> <script language="JavaScript" type="text/JavaScript"> function form_onsubmit(type) { var form = document.form; var returnValue = false; if (form.email.value == "") { alert("Please ENTER your email"); form.email.focus(); } else if (!validEmail(form.email,"E-mail",true)) return false; else { returnValue = true; MM_openBrWindow('../mailinglist.php?type='+type+'&email='+form.email.value,'mailing','scrollbars=yes,width=195,height=185') } return returnValue; } </script> <SCRIPT language=JavaScript> function form1_onsubmit() { var form = document.form1; var returnValue = false; if (form.txtname.value == "") { alert("Please enter your name!"); form.txtname.focus(); } //else if (!validEmail(form.txtemail,"E-mail address",false) // ) //return false; else if ((form.txtphone.value == "") && (form.txtemail.value == "")) { alert("Please enter your telephone number or email!"); form.txtphone.focus(); } else if (form.txtenquiry.value == "") { alert("Please fill in your enquiry!"); form.txtenquiry.focus(); //alert(form.call[0].checked) } else if ((form.txtphone.value == "") && (form.call[0].checked)) { alert("Please enter your telephone number!"); form.txtphone.focus(); } else if ((form.txtemail.value != "") && (!validEmail(form.txtemail,"E-mail address",true))) return false; else { returnValue = true; } return returnValue; } </SCRIPT> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-33692586-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body> <div id="wrap"> <div id="header"> </div> <!-- eof header --> <div id="menu"> <? INCLUDE "../inc/newmenu.php" ?> </div> <!-- eof menu --> <div id="main"> <div id="left"> <div class="column-box-header"> <h1 class="column-box-header-text"> Models By Category </h1> </div> <div class="column-box"> <div class="column-box-content"> <table> <tr> <td style="height: 10px;"></td> </tr> <tr> <td class="textheading"><a href="../models/index.php?cat=1">Male models</a></td> </tr> <tr> <td class="textheading">Female Models</td> </tr> <tr> <td class="text"><a href="../models/index.php?subcat=1"> -Solo American</a></td> </tr> <tr> <td class="text"><a href="../models/index.php?subcat=2"> -Artistic Nude</a></td> </tr> <tr> <td class="text"><a href="../models/index.php?subcat=4"> -Girl Girl Soft</a></td> </tr> <tr> <td class="text"><a href="../models/index.php?subcat=6"> -Girl Girl XXX</a></td> </tr> <tr> <td class="text"><a href="../models/index.php?subcat=3"> -Boy Girl Soft</a></td> </tr> <tr> <td class="text"><a href="../models/index.php?subcat=5"> -Boy Girl All</a></td> </tr> <tr> <td class="textheading"><a href="../models/index.php?cat=4">Couples</a></td> </tr> </table> </div> </div><!--// column-box //--> <div class="column-box-header"> <h1 class="column-box-header-text"> Model Of The Month </h1> </div> <div class="column-box"> <div class="column-box-content"> <div id="modelImgTd"><a href="../contact/models/model.php?modelID=926"><img src="../cms/models/feature/M.O.1719.4.jpg" width="120" border="0" align="center"></a></div> <p class="column-box-text"> Syren Sexton, the pictures say it all!</p> </div> <div class="column-box-footer"> <div class="column-box-footer-text"> <a href="../contact/models/model.php?modelID=926"> More Info <img class="go-button-s2" src="../imgs/go_button.png" alt="" /> </a> </div> </div> </div><!--// column-box //--> <div class="column-box-header"> <h1 class="column-box-header-text"> Mailing List </h1> </div> <div class="column-box"> <div class="column-box-content"> <form name=form> <p class="column-box-text">Enter Email Address</p> <input name="email" type="text" class="textbox" size="18"> <a href="javascript:;" onClick="return form_onsubmit('add');"><img src="../images/add.gif" border="0"></a> <a href="javascript:;" onClick="return form_onsubmit('delete');"><img src="../images/remove.gif" border="0"></a> </form> </div> </div><!--// column-box //--> </div> <!-- eof left --> <div id="content"> <div id="news-bar"> <h1 id="news-bar-text"> Male Model Application Form </h1> </div> <div id="news-container"> <div id="news-story-container"> <div class="news-box"> <table width="100%" cellpadding="2" cellspacing="0"> <form name="form1" onsubmit="return form1_onsubmit();" enctype="multipart/form-data" action="javascript:void(0);" method="post"> <tr> <td colspan="4"><img src="../images/spacer.gif" width="16" height="6"></td> </tr> <?php if (isset($error)){ echo "<tr> <td colspan=\"4\" align=\"center\" style=\"background-color:#ffffff; color:#ff0000;\">$error</td> </tr>"; } ?> <tr> <td class="text9" width="25%"><strong>Stage Name:</strong></td> <td width="25%"><strong><input type="text" name="stageName" class="textbox" value="<?php if (isset($_POST['stageName'])){ echo "{$_POST['stageName']}";} ?>" /> </strong></td> <td class="text9" width="25%"><strong>Occupation:</strong></td> <td width="25%"><input type="text" name="occupation" class="textbox" value="<?php if (isset($_POST['occupation'])){ echo "{$_POST['occupation']}";} ?>" /></td> </tr> <tr> <td class="text9"><strong>First Name:</strong></td> <td><strong><input type="text" name="firstName" class="textbox" value="<?php if (isset($_POST['firstName'])){ echo "{$_POST['firstName']}";} ?>" /> </strong></td> <td class="text9"><strong>Surname:</strong></td> <td><input type="text" name="surName" class="textbox" value="<?php if (isset($_POST['surName'])){ echo "{$_POST['surName']}";} ?>" /></td> </tr> <tr> <td valign="top" class="text9"><strong>Address 1:</strong></td> <td colspan="3"><strong><textarea name="address1" cols="40" rows="3" class="textbox"><?php if (isset($_POST['address1'])){ echo "{$_POST['address1']}";} ?></textarea> </strong></td> </tr> <tr> <td valign="top" class="text9"><strong>Address 2:</strong></td> <td colspan="3"><strong><textarea name="address2" cols="40" rows="3" class="textbox"><?php if (isset($_POST['address2'])){ echo "{$_POST['address2']}";} ?></textarea> </strong></td> </tr> <tr> <td valign="top" class="text9"><strong>Address 3:</strong></td> <td colspan="3"><strong><textarea name="address3" cols="40" rows="3" class="textbox"><?php if (isset($_POST['address3'])){ echo "{$_POST['address3']}";} ?></textarea> </strong></td> </tr> <tr> <td class="text9"><strong>Town/City:</strong></td> <td><strong><input type="text" name="town" class="textbox" value="<?php if (isset($_POST['town'])){ echo "{$_POST['town']}";} ?>" /> </strong></td> <td class="text9"><strong>County/State:</strong></td> <td><input type="text" name="states" class="textbox" value="<?php if (isset($_POST['states'])){ echo "{$_POST['states']}";} ?>" /></td> </tr> <tr> <td class="text9"><strong>Post/Zip Code:</strong></td> <td><strong><input type="text" name="postcode" class="textbox" value="<?php if (isset($_POST['postcode'])){ echo "{$_POST['postcode']}";} ?>" /> </strong></td> <td> </td> <td> </td> </tr> <tr> <td class="text9"><strong>Home Tele:</strong></td> <td><strong><input type="text" name="homeNo" class="textbox" value="<?php if (isset($_POST['homeNo'])){ echo "{$_POST['homeNo']}";} ?>" /> </strong></td> <td class="text9"><strong>Mobile Tele:</strong></td> <td><input type="text" name="mobileNo" class="textbox" value="<?php if (isset($_POST['mobileNo'])){ echo "{$_POST['mobileNo']}";} ?>" /></td> </tr> <tr> <td class="text9"><strong>E-mail:</strong></td> <td><strong><input type="text" name="email" class="textbox" value="<?php if (isset($_POST['email'])){ echo "{$_POST['email']}";} ?>" /> </strong></td> <td class="text9"><strong>Web Address:</strong></td> <td><input type="text" name="webAddress" class="textbox" value="<?php if (isset($_POST['webAddress'])){ echo "{$_POST['webAddress']}";} ?>" /></td> </tr> <tr> <td class="text9"><strong>N I Number:</strong></td> <td><strong><input type="text" name="niNo" class="textbox" value="<?php if (isset($_POST['niNo'])){ echo "{$_POST['niNo']}";} ?>" /> </strong></td> <td> </td> <td> </td> </tr> <tr> <td class="text9"><strong>Date Of Birth:</strong></td> <td><strong><input type="text" name="dob" class="textbox" value="<?php if (isset($_POST['dob'])){ echo "{$_POST['dob']}";} ?>" /> </strong></td> <td> </td> <td> </td> </tr> <tr> <td class="text9"><strong>Age:</strong></td> <td><strong><input type="text" name="age" class="textbox" value="<?php if (isset($_POST['age'])){ echo "{$_POST['age']}";} ?>" /> </strong></td> <td> </td> <td> </td> </tr> <tr> <td class="text9"><strong>Star Sign:</strong></td> <td><strong><input type="text" name="star" class="textbox" value="<?php if (isset($_POST['star'])){ echo "{$_POST['star']}";} ?>" /> </strong></td> <td> </td> <td> </td> </tr> <tr> <td class="text9"><strong>Weight:</strong></td> <td><strong><input type="text" name="weight" class="textbox" value="<?php if (isset($_POST['weight'])){ echo "{$_POST['weight']}";} ?>" /> </strong></td> <td class="text9"><strong>Height:</strong></td> <td><input type="text" name="height" class="textbox" value="<?php if (isset($_POST['height'])){ echo "{$_POST['height']}";} ?>" /></td> </tr> <tr> <td class="text9"><strong>Dress Size:</strong></td> <td><strong><input type="text" name="suitSize" class="textbox" value="<?php if (isset($_POST['suitSize'])){ echo "{$_POST['suitSize']}";} ?>" /> </strong></td> <td class="text9"><strong>Bust Size:</strong></td> <td><input type="text" name="chestSize" class="textbox" value="<?php if (isset($_POST['chestSize'])){ echo "{$_POST['chestSize']}";} ?>" /></td> </tr> <tr> <td class="text9"><strong>Waist:</strong></td> <td><strong><input type="text" name="waistSize" class="textbox" value="<?php if (isset($_POST['waistSize'])){ echo "{$_POST['waistSize']}";} ?>" /> </strong></td> <td class="text9"><strong>Hips:</strong></td> <td><input type="text" name="hipSize" class="textbox" value="<?php if (isset($_POST['hipSize'])){ echo "{$_POST['hipSize']}";} ?>" /></td> </tr> <tr> <td class="text9"><strong>Shoe Size:</strong></td> <td><strong><input type="text" name="shoeSize" class="textbox" value="<?php if (isset($_POST['shoeSize'])){ echo "{$_POST['shoeSize']}";} ?>" /> </strong></td> <td><strong>Cup Size:</strong></td> <td><input type="text" name="cupSize" class="textbox" value="<?php if (isset($_POST['cupSize'])){ echo "{$_POST['cupSize']}";} ?>" /></td> </tr> <tr> <td class="text9"><strong>Hair Color:</strong></td> <td><strong><input type="text" name="hairColor" class="textbox" value="<?php if (isset($_POST['hairColor'])){ echo "{$_POST['hairColor']}";} ?>" /> </strong></td> <td class="text9"><strong>Length:</strong></td> <td><input type="text" name="length" class="textbox" value="<?php if (isset($_POST['length'])){ echo "{$_POST['length']}";} ?>" /></td> </tr> <tr> <td class="text9"><strong>Eye Color</strong></td> <td><strong><input type="text" name="eyesColor" class="textbox" value="<?php if (isset($_POST['eyesColor'])){ echo "{$_POST['eyesColor']}";} ?>" /> </strong></td> <td class="text9"><strong>Complexion:</strong></td> <td><select name="complexion" class="textbox"> <option value="" selected>Select One..</option> <option value="Fair">Fair</option> <option value="Medium">Medium</option> <option value="Dark">Dark</option> <option value="Other">Other</option> </select></td> </tr> <tr> <td class="text9"><strong>Ethnic Origin:</strong></td> <td><strong> <select name="ethnicOrigin" class="textbox"> <option value="" selected>Select One..</option> <option value="European">European</option> <option value="Asian">Asian</option> <option value="African">African</option> <option value="Afro/Caribbean">Afro/Caribbean</option> <option value="Oriental">Oriental</option> <option value="Latin">Latin</option> </select> </strong></td> <td> </td> <td> </td> </tr> <tr> <td colspan="4"><hr align="center" width="100%" size="1" noshade color="#3C4B86"></td> </tr> <tr> <td colspan="4" class="text9"><strong>Additional Info</strong></td> </tr> <tr> <td class="text9"><strong>Do You Smoke?</strong></td> <td valign="baseline" class="text9"><strong> <input type="radio" name="radio1" value="Yes"> Yes <input type="radio" name="radio1" value="no"> No </strong></td> <td class="text9"><strong>Do You Drink?</strong></td> <td valign="baseline" class="text9"><strong> <input type="radio" name="radio2" value="Yes"> Yes <input type="radio" name="radio2" value="no"> No </strong></td> </tr> <tr> <td class="text9"><strong>Do You Drive?</strong></td> <td valign="baseline" class="text9"><strong> <input type="radio" name="radio3" value="Yes"> Yes <input type="radio" name="radio3" value="no"> No </strong></td> <td> </td> <td> </td> </tr> <tr> <td valign="top" class="text9"><strong>Tattoos:</strong></td> <td colspan="3"><strong><textarea name="tattoos" cols="40" rows="3" class="textbox"><?php if (isset($_POST['tattoos'])){ echo "{$_POST['tattoos']}";} ?></textarea> </strong></td> </tr> <tr> <td valign="top" class="text9"><strong>Piercings:</strong></td> <td colspan="3"><strong> <textarea name="piercings" cols="40" rows="3" class="textbox"><?php if (isset($_POST['piercings'])){ echo "{$_POST['piercings']}";} ?></textarea> </strong></td> </tr> <tr> <td colspan="4"><hr align="center" width="100%" size="1" noshade color="#3C4B86"></td> </tr> <tr> <td colspan="4" class="text9"><strong>Work Undertaken</strong></td> </tr> <tr> <td class="text9"><strong>Lifestyle: <input type="checkbox" name="checkbox" value="Yes" class="textbox"> </strong></td> <td class="text9"><strong>Promotions: <input type="checkbox" name="checkbox2" value="Yes" class="textbox"> </strong></td> <td class="text9"><strong>Swimwear/Lingerie: <input type="checkbox" name="checkbox3" value="Yes" class="textbox"> </strong></td> <td class="text9"><strong>Topless:</strong> <input type="checkbox" name="checkbox4" value="Yes" class="textbox"> </td> </tr> <tr> <td class="text9"><strong>Figure Nude: <input type="checkbox" name="checkbox5" value="Yes" class="textbox" /> </strong></td> <td class="text9"><strong>Playboy Style: <input type="checkbox" name="checkbox6" value="Yes" class="textbox" /> </strong></td> <td class="text9"><strong>Top Shelf: <input type="checkbox" name="checkbox7" value="Yes" class="textbox" /> </strong></td> <td class="text9"><strong>Girl/Girl Soft: <input type="checkbox" name="checkbox8" value="Yes" class="textbox" /> </strong></td> <td> </td> </tr> <tr> <td class="text9"><strong>Boy/Girl Soft: <input type="checkbox" name="checkbox9" value="Yes" class="textbox" /> </strong></td> <td class="text9"><strong>Girl/Girl XXX: <input type="checkbox" name="checkbox10" value="Yes" class="textbox" /> </strong></td> <td class="text9"><strong>Boy/Girl XXX: <input type="checkbox" name="checkbox11" value="Yes" class="textbox" /> </strong></td> <td class="text9"><strong>Stills: <input type="checkbox" name="checkbox12" value="Yes" class="textbox" /> </strong></td> <td> </td> </tr> <tr> <td class="text9"><strong>Video: <input type="checkbox" name="checkbox13" value="Yes" class="textbox"> </strong></td> <td class="text9"> </td> <td class="text9"> </td> <td class="text9"> </td> <td> </td> </tr> <tr> <td valign="top" class="text9"><strong>Previous Experience:</strong></td> <td colspan="3"><textarea name="experience" cols="40" rows="3" class="textbox"><?php if (isset($_POST['experience'])){ echo "{$_POST['experience']}";} ?></textarea></td> </tr> <tr> <td class="text9"><strong>Introduce By:</strong></td> <td colspan="3"><input type="text" name="introduceBy" class="textbox"></td> </tr> <tr> <td class="text9"><strong>Image:</strong><br />Please add a recent photo.</td> <td colspan="3" class="text"><input id="file_upload" name="file_upload" type="file" /></td> </tr> <tr> <td colspan="4"><img src="../images/spacer.gif" width="16" height="4"></td> </tr> <tr> <td colspan="4" align="center"> <input type="hidden" value="<? echo $dateTime; ?>" name="dateTime"> <input type="submit" class="textbox" name="submit" value="Submit"> </td> </tr> <tr> <td colspan="4"><img src="../images/spacer.gif" width="16" height="6"></td> </tr> </table> </form> </div><!--// news-box //--> </div><!--// news-story-container //--> </div><!--// news-container //--> </div> <!-- eof content --> </div> <!-- eof main --> </div> <!-- eof wrap --> <div id="footer"> </div> <!-- eof footer --> <?php //print_r($_POST); ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 15, 2012 Share Posted August 15, 2012 What error/problems are you experiencing? What have you tried and what were the results? Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted August 15, 2012 Author Share Posted August 15, 2012 if i leave action="" with the onsubmit javascript thing it just does nothing. originally i had it go to another page and had it validate in javascript. now it does it in PHP but i would lie the JS the way it used to be. but i am thinking i may have changed the form values in the process and it is not matching up with the JS. Quote Link to comment Share on other sites More sharing options...
Christian F. Posted August 15, 2012 Share Posted August 15, 2012 After a quick look over that code, which you really should clean up, I think the problem lies with this line: MM_openBrWindow('../mailinglist.php?type='+type+'&email='+form.email.value,'mailing','scrollbars=yes,width=195,height=185') Why are you opening a new page for that, and if this really is necessary you should be using the value from form.action as the URL to post to. But please: Use proper indenting in your code, remove all unnecessary newlines (at most two in a row), use valid (strict) HTML, put the JS into external files, and use a template (engine) for your e-mail at least. It will all help making your code a lot more readable, and thus a lot easier to maintain and help you with. Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 15, 2012 Share Posted August 15, 2012 You need to debug your code. You have way too much going on in there for us to "see" the problem. You even have a lot of included JS files that could be causing a problem. Change the onsubmit action to call a function that just does a simple alert. If that works, then add back sections of code for the validation logic that you can test. If you add a section back and it fails then you know what needs to be fixed. However, if the simple alter does not fire, then there is something preventing the onsubmit trigger from calling the function. Many times this is due to a compilation error in the JavaScript. So, it could be in the JS on that page or in any one of the included JS files. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.