Jump to content

Recommended Posts

When all the required fields of the form are filled out and submitted the user gets an error:

RMA Form Submission Error:

Please hit the BACK button on your Web Broswer and resubmit the RMA form.

Thank You

 

below is the code of the .php page. any insight would be greatly appreciated.

<html>

<head>

<title>RMA Request Form</title>

<script language="JavaScript">

<!--

function check() {

    s="";

    if (f.bzip.value =="") { s='Please specify Business Zip Code'; }

    if (f.bst.value =="") { s='Please specify Business State'; }

    if (f.bcity.value =="") { s='Please specify Business City'; }

    if (f.baddr.value =="") { s='Please specify Business Address'; }

    if (f.bname.value =="") { s='Please specify Business Name'; }

    if (f.bphone.value =="") { s='Please specify Business Phone'; }

    if (f.email.value =="") { s='Please specify Email address'; }

    if (f.zip.value =="") { s='Please specify Zip Code'; }

    if (f.st.value =="") { s='Please specify State'; }

    if (f.city.value =="") { s='Please specify City'; }

    if (f.addr.value =="") { s='Please specify Address'; }

    if (f.lname.value =="") { s='Please specify Last Name'; }

    if (f.fname.value =="") { s='Please specify First Name'; }

    if (s!="") {alert (s);return ( false );}

   

}

 

<!-- -->

</script>

    </head>

 

<body background="../media/gradient_dark.png">

<table width="700" border="0" cellspacing="0" cellpadding="0" align="center">

<tr>

<td colspan="3"><img src="../media/header.gif" alt="" height="100" width="700" usemap="#header_776_bluec2d8c67c" border="0"><map name="header_776_bluec2d8c67c"><area shape="rect" coords="17,8,265,70" href="http://www.mastercool.com" alt=""></map></td>

</tr> <tr>

<td colspan="3" nowrap bgcolor="#003366">

<div align="center">

<menumachine name="mastercoolmenu071607" id="m26v3267">

<csobj t="Component" csref="../menumachine/mastercoolmenu071607/menuspecs.menudata"><noscript>

<p><a class="mm_no_js_link" href="../menumachine/mastercoolmenu071607/navigation.html">Site Navigation</a></p>

</noscript> </csobj>

<script type="text/javascript"><!--

var mmfolder=/*URL*/"../menumachine/",zidx=1000;

//--></script>

<script type="text/javascript" src="../menumachine/menumachine2.js"></script>

<script type="text/javascript" src="../menumachine/mastercoolmenu071607/menuspecs.js"></script>

</menumachine>

</div>

</td>

</tr>

<tr bgcolor="#999999">

<td colspan="3" bgcolor="white"><?php

 

// ************Begin Configure***************

@$email = $_POST["Customer_E-mail_Address"];

@$fname = $_POST["Customer_First_Name"];

@$lname = $_POST["Customer_Last_Name"];

@$model = $_POST["Model"];

@$modelno = $_POST["Model_Number"];

@$serialno = $_POST["Serial_Number"];

@$address = $_POST["Mailing_Address"];

@$zip = $_POST["Zip_Code"];

@$city = $_POST["City"];

@$state = $_POST["State"];

@$country = $_POST["Country"]; @$cname = $_POST["Company_Name"];

@$title = $_POST["Customer_Title"];

@$phone = $_POST["Phone_Number"];

@$fax = $_POST["Fax_Number"];

@$comments = $_POST["Additional_Comments"];

@$dateofpur = $_POST["Date_of_Purchase"];

@$purfrom = $_POST["Purchased_From"];

 

// ************End Configure****************

 

 

if(ereg("([[:alnum:]\.\-]+)(\@[[:alnum:]\.\-]+\.+)", $email)) {

//echo "Email Field Populated. <br>";

if ((!empty($fname)) && (!empty($lname))){

//echo "Name Field Populated. <br>";

if (!empty($model)) {

//echo "Model Field Populated. <br>";

if (!empty($modelno)) {

//echo "Model Number Field Populated. <br>";

if (!empty($serialno)) {

//echo "Serial Number Field Populated. <br>";

if (!empty($phone)) {

//echo "Serial Number Field Populated. <br>";

if (!empty($dateofpur)) {

//echo "Serial Number Field Populated. <br>";

if (!empty($comments)) {

//echo "Serial Number Field Populated. <br>";

                                   

//**************BEGIN MAIL PARSING CODE****************

$body="\n\n REQUEST FORM FROM MASTERCOOL.COM-RMA FORM \n";

                                $body.="=============================================== \n";

 

$body.="  Customer's Contact Information \n\n"; $body.="  First Name: $fname \n";

$body.="  Last Name: $lname \n";

$body.="  Title: $title \n";

$body.="  Contact Phone Number: $phone \n";

$body.="  Contact Fax Number: $fax \n";

$body.="  E-mail: $email \n";

$body.="  Company Name: $cname \n";

$body.="  Address: $address \n";

$body.="  City: $city \n";

$body.="  State: $state \n";

$body.="  Country: $country \n";

$body.="  Zip code: $zip \n\n";                                                        $body.="=============================================== \n";

$body.="  Product Detail & Reasons for RMA Request \n\n";

$body.="  Model: $model \n";

$body.="  Model Number: $modelno \n";

$body.="  Serial Number: $serialno \n";

$body.="  Purchased From: $purfrom \n";

$body.="  Date of Purchase: $dateofpur \n\n";

$body.="  Additional Customer Comments:\n\n  $comments \n\n\n";

$body.="  Thank You, \n  Mastercool.com";

           

if (@mail("mcoolgraphics@yahoo.com", "RMA Request Form from Mastercool", "$body", "From: Mastercool inc.")) {

echo "<div class=txttitle align=center><br>Your RMA Request form has been submitted and is pending review by our RMA Department.  Thank You!<br><br></div>";

} else {

//This echo's the error message if the email did not send.

//You could change the text in between the <p> tags.

echo ("<div class=formerror align=center>RMA Form Submission Error:<br></div> <div class=formerror align=center><p> Please hit the BACK button on your Web Broswer and resubmit the RMA form. </p><p> Thank You </p></div>");

}

//**************END MAIL PARSING CODE****************

} else {

echo "<div class=formerror align=center>RMA Form Submission Error:<br></div>  <div class=formerror align=center><p>No valid Description of Problem was entered into the Detailed Description Field. <br>Please hit the Back button and re-enter a valid Description of the Problem in the Detailed Description Field.</div>";

}                                } else {

echo "<div class=formerror align=center>RMA Form Submission Error:<br></div>  <div class=formerror align=center><p>No valid Date of Purchase was entered into the Date of Purchase Field. <br>Please hit the Back button and re-enter a valid Date of Purchase in the Date of Purchase Field.</div>";

}

} else {

echo "<div class=formerror align=center>RMA Form Submission Error:<br></div>  <div class=formerror align=center><p>No valid Phone Number was entered into the Phone Field. <br>Please hit the Back button and re-enter a valid Phone Number in the Phone Field.</div>";

}                                               

} else {

echo "<div class=formerror align=center>RMA Form Submission Error:<br></div>  <div class=formerror align=center><p>No Serial Number was entered into the Serial Number Field. <br>Please hit the Back button and re-enter a valid Serial Number in the Serial Number Field.</div>";

}

} else {

echo "<div class=formerror align=center>RMA Form Submission Error:<br></div>  <div class=formerror align=center><p>No Model Number was entered into the Model Number Field. <br>Please hit the Back button and re-enter a valid Model Number in the Model Number Field.</div>";

}

} else {

echo "<div class=formerror align=center>RMA Form Submission Error:<br></div>  <div class=formerror align=center><p>No Model was entered into the Model Field. <br>Please hit the Back button and re-enter a valid Model in the Model Field.</div>";

}

} else {

echo "<div class=formerror align=center>RMA Form Submission Error:<br></div>  <div class=formerror align=center><p> No Name was entered into the Name Field. <br>Please hit the Back button and re-enter a valid Name in the Name Field.</div>";

    }

} else {

    echo "<div class=formerror align=center>RMA Form Submission Error:<br></div> <p> <div class=formerror align=center> Incorrect email address entered: $email";

    echo "<br><div class=formerror align=center> Please hit the Back button and re-enter a valid email address in the Email Address Field.</div>";

}

 

?></td>

</tr>

<tr bgcolor="#999999">

<td colspan="3" nowrap bgcolor="#999999"><img src="../media/index_bottom_rule.jpg" alt="" height="19" width="700" border="0"></td>

</tr>

<tr>

<td width="215"><font size="1" face="Arial, Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">© Mastercool Inc. 2007</font></td>

<td></td>

<td> <table width="180" border="0" cellspacing="0" cellpadding="3" align="right">

<tr>

<td><font size="1" face="Arial, Helvetica, Geneva, Arial, SunSans-Regular, sans-serif"><a href="featured_items.html">Featured Items</a></font></td>

<td><font size="1" face="Arial, Helvetica, Geneva, Arial, SunSans-Regular, sans-serif"><a href="sitemap.html">Site Map</a></font></td>

</tr>

</table>

 

 

    </body>

 

</html>

Link to comment
https://forums.phpfreaks.com/topic/67062-form-issue/
Share on other sites

This is the message I received when I took away @:

 

Warning: mail(): SMTP server response: 553 5.3.0 <me@localhost.com>... DISCARD Spam Relay in d:\Customers\user1180256\www\pages\rma_process.php on line 127

RMA Form Submission Error:

Please hit the BACK button on your Web Broswer and resubmit the RMA form.

 

Thank You

Link to comment
https://forums.phpfreaks.com/topic/67062-form-issue/#findComment-336304
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.