Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,573 members, 7,958,779 topics. Date: Wednesday, 25 September 2024 at 11:49 PM |
Nairaland Forum / Science/Technology / Webmasters / Dont Know Was Wrong With My Order Form : Its Not Submitting (1223 Views)
Pls Wait For A Few Minutes B4 Submitting This Post. Our Server Is Overwheled / Submitting Your Site To Search Directories, Forums And Special Sites / Was Wrong With Smartwebng.com (2) (3) (4)
Dont Know Was Wrong With My Order Form : Its Not Submitting by fd4all234(m): 5:15pm On Jun 22, 2011 |
Hi guy, i dont know was wrong with my website form, anything my client try submitting it would say We are very sorry, but there were error(s) found with the form you submitted. Please fill the required details. We are sorry, but there appears to be a problem with the form you submitted. Please go back and fix these errors, but the details where filled, dont know why, you can try it as well, http://www.frisahost.com/ordernow.html check the link to confirm what i am saying |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by DualCore1: 5:35pm On Jun 22, 2011 |
Post the content of sendform2.php On a side note, why don't you use a billing system like WHMCS for your site? |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by yawatide(f): 7:16pm On Jun 22, 2011 |
More than likely, the name of one or form fields on the "ordernow.html" page doesn't match what sendform2.php is expecting. Either that or the names match but a validation is failing. Like DC said, paste the code. |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by fd4all234(m): 7:42pm On Jun 22, 2011 |
<?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "order@frisahost.com"; $email_subject = "Order Data"; function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submitted. "; echo "Please fill the required details. "; echo $error." "; echo "Please go back and fix these errors. "; die(); } // validation expected data exists if(!isset($_POST['Domain_name']) || !isset($_POST['first_name']) || !isset($_POST['last_name']) || !isset($_POST['email_address']) || !isset($_POST['address']) || !isset($_POST['telephone']) || !isset($_POST['hosting_plans'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $domain_name = $_POST['domain_name']; // required $first_name = $_POST['first_name']; // required $last_name = $_POST['last_name']; // required $email_from = $_POST['email_address']; // required $email_from = $_POST['address']; // required $telephone = $_POST['telephone']; // required $comments = $_POST['hosting_plans']; // required $error_message = ""; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; if(!preg_match($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid. '; } $string_exp = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$first_name)) { $error_message .= 'The First Name you entered does not appear to be valid. '; } if(!preg_match($string_exp,$last_name)) { $error_message .= 'The Last Name you entered does not appear to be valid. '; } if(strlen($hosting_plans) < 2) { $error_message .= 'The hosting plans you entered do not appear to be valid. '; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href" return str_replace($bad,"",$string); } $email_message .= "Domain Name: ".clean_string($domain_name)."\n"; $email_message .= "First Name: ".clean_string($first_name)."\n"; $email_message .= "Last Name: ".clean_string($last_name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "address: ".clean_string($address)."\n"; $email_message .= "Telephone: ".clean_string($telephone)."\n"; $email_message .= "hosting plans: ".clean_string($hosting_plans)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> <center> <table width="86%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#990000" id="AutoNumber1" style="border-collapse: collapse;"> <tbody> <tr> <td width="100%" align="center"><p><strong>We have recieve your order </a></strong></p> <p><strong>Make your payment to any of our banks</a></strong></p> <p><strong>Our Banks details are at the right top side of this page</strong></a></p> </tr> </tbody> </table> ----------------- <form name="register" method="post" action="sendform2.php"> <table width="450px"> <tbody><tr> <td width="202"> </td></tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54">Domain Name * </span></td> <td bgcolor="#993300" valign="top" width="236"><input name="domain_name" maxlength="50" size="30" type="text"> </td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54"> <label for="first_name">First Name *</label> </span></td> <td bgcolor="#993300" valign="top"><input name="first_name" maxlength="50" size="30" type="text"></td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54">Last Name <label for="last_name">*</label> </span></td> <td bgcolor="#993300" valign="top"><input name="last_name" maxlength="50" size="30" type="text"></td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54"> <label for="email">Email Address *</label> </span></td> <td bgcolor="#993300" valign="top"><input name="email" maxlength="80" size="30" type="text"></td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54"> <label for="email">Address * </label> </span></td> <td bgcolor="#993300" valign="top"><input name="Address" maxlength="50" size="30" type="text"> </td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54"> <label for="telephone">Telephone Number</label> * </span></td> <td bgcolor="#993300" valign="top"><input name="telephone" maxlength="30" size="30" type="text"> </td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54"> <label for="comments">Hosting Plans * </label> </span></td> <td bgcolor="#993300" valign="top"><select name="select"> <option selected="selected">Choose plan</option> <option>Basic</option> <option>Standard</option> <option>Advance</option> </select> </td> </tr> <tr> <td colspan="2" style="text-align: center;" bgcolor="#993300"><input name="submit" value="Submit" type="submit"> <input name="reset" value="Reset" type="reset"> </td> </tr> </tbody></table> </form> |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by fd4all234(m): 9:23pm On Jun 22, 2011 |
here is the code <form name="register" method="post" action="sendform2.php"> <table width="450px"> <tbody><tr> <td width="202"> </td></tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54">Domain Name * </span></td> <td bgcolor="#993300" valign="top" width="236"><input name="domain_name" maxlength="50" size="30" type="text"> </td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54"> <label for="first_name">First Name *</label> </span></td> <td bgcolor="#993300" valign="top"><input name="first_name" maxlength="50" size="30" type="text"></td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54">Last Name <label for="last_name">*</label> </span></td> <td bgcolor="#993300" valign="top"><input name="last_name" maxlength="50" size="30" type="text"></td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54"> <label for="email">Email Address *</label> </span></td> <td bgcolor="#993300" valign="top"><input name="email" maxlength="80" size="30" type="text"></td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54"> <label for="email">Address * </label> </span></td> <td bgcolor="#993300" valign="top"><input name="Address" maxlength="50" size="30" type="text"> </td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54"> <label for="telephone">Telephone Number</label> * </span></td> <td bgcolor="#993300" valign="top"><input name="telephone" maxlength="30" size="30" type="text"> </td> </tr> <tr> <td bgcolor="#993300" valign="top"><span class="style54"> <label for="comments">Hosting Plans * </label> </span></td> <td bgcolor="#993300" valign="top"><select name="select"> <option selected="selected">Choose plan</option> <option>Basic</option> <option>Standard</option> <option>Advance</option> </select> </td> </tr> <tr> <td colspan="2" style="text-align: center;" bgcolor="#993300"><input name="submit" value="Submit" type="submit"> <input name="reset" value="Reset" type="reset"> </td> </tr> </tbody></table> </form> |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by yawatide(f): 11:14pm On Jun 22, 2011 |
Possible problem: It looks to me as if you are checking for whether or not your php vars have values, and "died" them if they don't, before you are even capturing those values. If this is the case, then no wonder you will always get the error: the values are never set to begin with. Trying moving the portion where you are capturing the values up above the "!isset" code and let us know if that works. |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by fd4all234(m): 9:37am On Jun 23, 2011 |
@yawa-ti-de i seems not to understand ur explanation, pls broke it down me more |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by yawatide(f): 11:44am On Jun 23, 2011 |
What I am saying is, move the section, where you are capturing the form fields: $domain_name = $_POST['domain_name']; // required $first_name = $_POST['first_name']; // required $last_name = $_POST['last_name']; // required $email_from = $_POST['email_address']; // required $email_from = $_POST['address']; // required $telephone = $_POST['telephone']; // required $comments = $_POST['hosting_plans']; // required from where it is now to just below the code where you are assigning $email_to. My point is that since the code always reads from top to bottom, it doesn't make sense, at least to me, to check if a form field isset when you have not even declared it, not to talk of assigning anything to it. In other words, you are asking if a null value is set, and of course, it isn't. Good luck! |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by DualCore1: 1:02pm On Jun 23, 2011 |
Jonathan |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by yawatide(f): 3:40pm On Jun 23, 2011 |
@DC: ROFLMAO! LWKMD!! |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by fd4all234(m): 5:12pm On Jun 23, 2011 |
fd4all234: after that what i get is this:Parse error: syntax error, unexpected '}' in /home/frisahos/public_html/sendform2.php on line 150 |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by DualCore1: 5:22pm On Jun 23, 2011 |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by fd4all234(m): 6:34pm On Jun 23, 2011 |
fd4all234: i ve tried but the message its bring out is Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/frisahos/public_html/sendform2.php on line 11, pls kindly help me with the correction of the code, below is the code: <?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "info@frisahost.com"; $email_subject = "Registration Data"; function died($error) { // your error code can go here echo "The "Domain name" field cannot be empty!, but there were error(s) found with the form you submitted. "; echo "The "Domain name" field cannot be empty!. "; echo "The "First Name" field cannot be empty!. "; echo "The "Last Name" field cannot be empty!. "; echo "The "Email Address" field cannot be empty!. "; echo "The Address" field cannot be empty!. "; echo "The Telephone Number" field cannot be empty!. "; echo "The "Hosting Plan" field cannot be empty!. "; echo $error." "; echo "Please go back and fix these errors. "; die(); } // validation expected data exists if(!isset($_POST['domain_name']) || !isset($_POST['first_name']) || !isset($_POST['last_name']) || !isset($_POST['email']) || !isset($_POST['address']) || !isset($_POST['telephone']) || !isset($_POST['Hosting_plans'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $domain_name = $_POST['domain_name']; // required $first_name = $_POST['first_name']; // required $last_name = $_POST['last_name']; // required $email_from = $_POST['email']; // required $address = $_POST['address']; // required $telephone = $_POST['telephone']; // not required $hosting_plans = $_POST['hosting_plans']; // required $error_message = ""; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; if(!preg_match($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid. '; } $string_exp = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$first_name)) { $error_message .= 'The First Name you entered does not appear to be valid. '; } if(!preg_match($string_exp,$last_name)) { $error_message .= 'The Last Name you entered does not appear to be valid. '; } if(strlen($hosting_plans) < 2) { $error_message .= 'The hosting_plans you entered do not appear to be valid. '; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href" return str_replace($bad,"",$string); } $email_message .= "Domain Name: ".clean_string($domain_name)."\n"; $email_message .= "First Name: ".clean_string($first_name)."\n"; $email_message .= "Last Name: ".clean_string($last_name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "Address: ".clean_string($address)."\n"; $email_message .= "Telephone: ".clean_string($telephone)."\n"; $email_message .= "Hosting_plans: ".clean_string($hosting_plans)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> Thank you for contacting us. We will be in touch with you very soon. <?php } ?> |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by fd4all234(m): 6:42pm On Jun 23, 2011 |
some should plesa help me rephrase the code, i ve tried but its still giving me the same error respond |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by yawatide(f): 6:54pm On Jun 23, 2011 |
1) I see you didn't move your code the way I asked you to 2) Undo all your changes and restore it to the state where it wasn't giving you the errors |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by fd4all234(m): 7:08pm On Jun 23, 2011 |
yawa-ti-de: do u mean $email_message .= "Domain Name: ".clean_string($domain_name)."\n"; sld be under function died($error) { // your error code can go here echo "The "Domain name" field cannot be empty!, but there were error(s) found with the form you submitted. "; echo "The "Domain name" field cannot be empty!. "; echo "Please go back and fix these errors. "; die(); |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by yawatide(f): 8:02pm On Jun 23, 2011 |
This is what I mean: To play it safe, after you have modified your code to match the above, add echo statements to each field, upload it, fill in all fields, hit submit, and verify that what you entered is actually being spit out |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by fd4all234(m): 9:30pm On Jun 23, 2011 |
do u mean like this, <?php if(isset($_POST['email'])) $domain_name = $_POST['domain_name']; // required $first_name = $_POST['first_name']; // required $last_name = $_POST['last_name']; // required $email_from = $_POST['email']; // required $address = $_POST['address']; // required $telephone = $_POST['telephone']; // not required $hosting_plans = $_POST['hosting_plans']; // required |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by yawatide(f): 2:59am On Jun 24, 2011 |
No, I mean exactly the way I posted it, directly above your question |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by frisahost(m): 10:26am On Jul 02, 2011 |
yawa-ti-de: Do u believed that i ve not been able to correct that form, it give giving error respond . |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by yawatide(f): 10:48am On Jul 02, 2011 |
Very scary. I suggest you find someone in your area to help you out, 1-on-1. |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by Nobody: 11:55am On Jul 02, 2011 |
I can help you to fix it asap, you can contact me via support@.com |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by frisahost(m): 7:53pm On Jul 02, 2011 |
Mr DC tell me more abt the WMHCM how does it work, |
Re: Dont Know Was Wrong With My Order Form : Its Not Submitting by Nobody: 9:09am On Jul 03, 2011 |
But i presume the whmcs have a website? |
(1) (Reply)
Accepting Verve Card Online / Enhance Downloads From Youtube Or Any Other Sites. / Want To Buy Ptc Website
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 145 |