Jump to content

troll2555

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

troll2555's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. and here is the php file <?php // Website Contact Form Generator // http://www.tele-pro.co.uk/scripts/contact_form/ // This script is free to use as long as you  // retain the credit link  // get posted data into local variables $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $EmailTo = "sales@vmwarts.com"; $Subject = "I want to sell a book"; $LastName = Trim(stripslashes($_POST['LastName'])); $FirstName = Trim(stripslashes($_POST['FirstName'])); $Street1 = Trim(stripslashes($_POST['Street1'])); $City = Trim(stripslashes($_POST['City'])); $State = Trim(stripslashes($_POST['State'])); $Province = Trim(stripslashes($_POST['Province'])); $Country = Trim(stripslashes($_POST['Country'])); $HomeTel = Trim(stripslashes($_POST['HomeTel'])); $Title = Trim(stripslashes($_POST['Title'])); $Author = Trim(stripslashes($_POST['Author'])); $Publisher = Trim(stripslashes($_POST['Publisher'])); $Date = Trim(stripslashes($_POST['Date'])); $Cover = Trim(stripslashes($_POST['Cover'])); $Price = Trim(stripslashes($_POST['Price'])); $Condition = Trim(stripslashes($_POST['Condition'])); // validation $validationOK=true; if (Trim($EmailFrom)=="") $validationOK=false; if (Trim($LastName)=="") $validationOK=false; if (Trim($FirstName)=="") $validationOK=false; if (Trim($Country)=="") $validationOK=false; if (Trim($Title)=="") $validationOK=false; if (Trim($Author)=="") $validationOK=false; if (Trim($Publisher)=="") $validationOK=false; if (Trim($Date)=="") $validationOK=false; if (!is_numeric($Date)) $validationOK=false; if (Trim($Cover)=="") $validationOK=false; if (Trim($Price)=="") $validationOK=false; if (!is_numeric($Price)) $validationOK=false; if (!$validationOK) {   print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";   exit; } // prepare email body text $Body = ""; $Body .= "LastName: "; $Body .= $LastName; $Body .= "\n"; $Body .= "FirstName: "; $Body .= $FirstName; $Body .= "\n"; $Body .= "Street1: "; $Body .= $Street1; $Body .= "\n"; $Body .= "City: "; $Body .= $City; $Body .= "\n"; $Body .= "State: "; $Body .= $State; $Body .= "\n"; $Body .= "Province: "; $Body .= $Province; $Body .= "\n"; $Body .= "Country: "; $Body .= $Country; $Body .= "\n"; $Body .= "HomeTel: "; $Body .= $HomeTel; $Body .= "\n"; $Body .= "Title: "; $Body .= $Title; $Body .= "\n"; $Body .= "Author: "; $Body .= $Author; $Body .= "\n"; $Body .= "Publisher: "; $Body .= $Publisher; $Body .= "\n"; $Body .= "Date: "; $Body .= $Date; $Body .= "\n"; $Body .= "Cover: "; $Body .= $Cover; $Body .= "\n"; $Body .= "Price: "; $Body .= $Price; $Body .= "\n"; $Body .= "Cover: "; $Body .= $Cover; $Body .= "\n"; $Body .= "Condition: "; $Body .= $Condition; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){   print "<meta http-equiv=\"refresh\" content=\"0;URL=http://www.vmwarts.com/ThankYouOffer.htm\">"; } else{   print "<meta http-equiv=\"refresh\" content=\"0;URL=http://www.vmwarts.com/error.htm\">"; } ?>
  2. Okay Here's the html portion of the Form page <form method="POST" action="http://www.vmwarts.com/contact5.php"> <p><font size="2">Your Email:* <br> </font> <input type="text" name="EmailFrom" size="20"><font size="2"> </font> <p><font size="2">Last Name:* <br> </font> <input type="text" name="LastName" size="20"><font size="2"> </font> <p><font size="2">First Name:* <br> </font> <input type="text" name="FirstName" size="20"><font size="2"> </font> <p><font size="2">Street:<br> </font> <input type="text" name="Street1" size="20"><font size="2"> </font> <p><font size="2">City:<br> </font> <input type="text" name="City" size="20"><font size="2"> </font> <p><font size="2">State:<br> </font> <input type="text" name="State" size="20"><font size="2"> </font> <p><font size="2">Province:<br> </font> <input type="text" name="Province" size="20"><font size="2"> </font> <p><font size="2">Country:* <br> </font> <input type="text" name="Country" size="20"><font size="2"> </font> <p><font size="2">Home Phone:<br> </font> <input type="text" name="HomeTel" size="20"><font size="2"> </font> <p>&nbsp;<p><b><span class="tiny"> <font face="Verdana" size="2" color="#800000">Information About Your Book:<br> </font></span></b><font face="Verdana" size="2">Fields marked (*) are required </font> <p>&nbsp;<p><font size="2">Title:* <br> </font> <input type="text" name="Title" size="20"><font size="2"> </font> <p><font size="2">Author:* <br> </font> <input type="text" name="Author" size="20"><font size="2"> </font> <p><font size="2">Publisher:* <br> </font> <input type="text" name="Publisher" size="20"><font size="2"> </font> <p><font size="2">Date:* <br> </font> <input type="text" name="Date" size="20"><font size="2"><p> <p><font size="2">Cover:* <br> </font> <select size="1" name="Cover"> <option>Leather</option> <option>Cloth</option> <option>Paper Wraps</option> <option>Other</option></select><font size="2"> </font> <p>Price:* <br> <input type="text" name="Price" size="20"><font size="2"> </font> <p><font size="2">Condition:<br> </font> <input type="text" name="Condition" size="20"><font size="2"> </font> <p style="text-align: center"><input type="submit" name="submit" value="Submit"> </form>
  3. changed to full url on them and tried again  still get a blank page pointing to http://www.vmwarts.com/contact5.php
  4. I am actually only trying to do what I initally thought was a simple contact form on my web page. There are thousands of contact me pages out there, but I can't seem to find any that will either work on my site. For some reason, this has become immensely complicated.  Research 'seemed" to indicate that php was the only way to go on this as a simple email me would not give my customer the ability to see what information I needed to make an offer to buy his book. Please, someone tell me how to beat this thing.  It is the last item I need so I can get back to the business of selling books, and out of the part about web page building. Yes, I am begging here for help, but I have been working on this for a week now and it is draining me.
  5. I'm not getting errors per se when i post it via the web page, it goes to the contact5.php and shows a blank page and nothing comes across via the email..
  6. Can some one PLEASE tell me why this php script won't run on my site You can see the html at http://www.vmwarts.com/we_buy_Form.htm Here's the php I am using.... <?php // Website Contact Form Generator // http://www.tele-pro.co.uk/scripts/contact_form/ // This script is free to use as long as you  // retain the credit link  // get posted data into local variables $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $EmailTo = "sales@vmwarts.com"; $Subject = "I want to sell a book"; $LastName = Trim(stripslashes($_POST['LastName'])); $FirstName = Trim(stripslashes($_POST['FirstName'])); $Street1 = Trim(stripslashes($_POST['Street1'])); $City = Trim(stripslashes($_POST['City'])); $State = Trim(stripslashes($_POST['State'])); $Province = Trim(stripslashes($_POST['Province'])); $Country = Trim(stripslashes($_POST['Country'])); $HomeTel = Trim(stripslashes($_POST['HomeTel'])); $Title = Trim(stripslashes($_POST['Title'])); $Author = Trim(stripslashes($_POST['Author'])); $Publisher = Trim(stripslashes($_POST['Publisher'])); $Date = Trim(stripslashes($_POST['Date'])); $Cover = Trim(stripslashes($_POST['Cover'])); $Price = Trim(stripslashes($_POST['Price'])); $Condition = Trim(stripslashes($_POST['Condition'])); // validation $validationOK=true; if (Trim($EmailFrom)=="") $validationOK=false; if (Trim($LastName)=="") $validationOK=false; if (Trim($FirstName)=="") $validationOK=false; if (Trim($Country)=="") $validationOK=false; if (Trim($Title)=="") $validationOK=false; if (Trim($Author)=="") $validationOK=false; if (Trim($Publisher)=="") $validationOK=false; if (Trim($Date)=="") $validationOK=false; if (!is_numeric($Date)) $validationOK=false; if (Trim($Cover)=="") $validationOK=false; if (Trim($Price)=="") $validationOK=false; if (!is_numeric($Price)) $validationOK=false; if (!$validationOK) {   print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";   exit; } // prepare email body text $Body = ""; $Body .= "LastName: "; $Body .= $LastName; $Body .= "\n"; $Body .= "FirstName: "; $Body .= $FirstName; $Body .= "\n"; $Body .= "Street1: "; $Body .= $Street1; $Body .= "\n"; $Body .= "City: "; $Body .= $City; $Body .= "\n"; $Body .= "State: "; $Body .= $State; $Body .= "\n"; $Body .= "Province: "; $Body .= $Province; $Body .= "\n"; $Body .= "Country: "; $Body .= $Country; $Body .= "\n"; $Body .= "HomeTel: "; $Body .= $HomeTel; $Body .= "\n"; $Body .= "Title: "; $Body .= $Title; $Body .= "\n"; $Body .= "Author: "; $Body .= $Author; $Body .= "\n"; $Body .= "Publisher: "; $Body .= $Publisher; $Body .= "\n"; $Body .= "Date: "; $Body .= $Date; $Body .= "\n"; $Body .= "Cover: "; $Body .= $Cover; $Body .= "\n"; $Body .= "Price: "; $Body .= $Price; $Body .= "\n"; $Body .= "Cover: "; $Body .= $Cover; $Body .= "\n"; $Body .= "Condition: "; $Body .= $Condition; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){   print "<meta http-equiv=\"refresh\" content=\"0;URL=ThankYou.htm\">"; } else{   print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; } ?>
×
×
  • 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.