Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1

Thread: Form...

  1. #1
    New Coder
    Join Date
    Dec 2010
    Posts
    12
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question Form...

    I have two forms on my site. The contact form is working thanks to the help of people on this form, however when I use a similar script for my second form and put it on the server I get page not found when I submit it. Below is my php script if you could please help me it would be much appreciated.

    Code:
    <?php
    
    error_reporting(-1);
    
    /* Variable Handlers */
    
    	$emailSubject = 'comparativemarketanalysis';
    	$webMaster = 'mbosick@remax.net';
    	
    /* Gathering Data Variables */
    
        $firstname = $_POST['firstname'];
        $lastname = $_POST['lastname']
        $email = $_POST['email'];
        $confemail = $_POST['confemail'];
        $phone = $_POST['phone'];
        $time = $_POST['time'];
        $year = $_POST['year'];
        $acreage = $_POST['acreage'];
        $style = $_POST['style'];
        $walkout = $_POST['walkout'];
        $approxabove = $_POST['approxabove'];
        $approxbelow = $_POST['approxbelow'];
        $bedroomsabove = $_POST['bedroomsabove'];
        $bedroomsbelow = $_POST['bedroomsbelow'];
        $bathroomsabove = $_POST['bathroomsabove'];
        $bathroomsbelow = $_POST['bathroomsbelow'];
        $roof = $_POST['roof'];
        $windows = $_POST['windows'];
        $siding = $_POST['siding'];
        $garage = $_POST['garage'];
        $otherstructuresField = $_POST['otherstructures'];
        $ifyes = $_POST['ifyes'];
        $view = $_POST['view'];
        $deck = $_POST['deck'];
        $tiledfloors = $_POST['tiledfloors'];
        $woodfloors = $_POST['woodfloors'];
        $fireplace = $_POST['fireplace'];
        $additionals = $_POST['additionals'];
        $address = $_POST['address'];
        $city = $_POST['city'];
        $zipcode = $_POST['zipcode'];
        $sell = $_POST['sell'];
        $newhome = $_POST['newhome'];
        $newsletter = $_POST['newsletter'];
        $comments = $_POST['comments'];
    	
    $body=" 
    <br><hr><br>
    Contact Information- <br>
    <br>
    Name: $name $lastname <br>
    Email: $email <br>
    Confirm Email: $confemail <br>
    Phone: $phone <br>
    Best Time to Contact: $time <br>
    <br>
    Property Infromation- <br>
    <br>
    Year Built: $year <br>
    Acreage: $acreage <br>
    Style of Home: $style <br>
    Walkout: $walkout <br>
    Approximate Finished Square Feet Above Ground <br>
    : $approxabove <br>
    Approximate Finished Square Feet Below Ground <br>
    : $approxbelow <br>
    Bedrooms Above Ground: $bedroomsabove <br>
    Bedrooms Below Ground: $bedroomsbelow <br>
    Bathrooms Above Ground: $bathroomsabove <br>
    Bathrooms Below Ground: $bathroomsbelow <br>
    Age of Roof: $roof <br>
    Age of Windows: $windows <br>
    Type of Exterior Siding: $siding <br>
    Garage: $garage <br>
    Other Outer Buildings: $otherstructers <br>
          If Yes Please Describe: $ifyes <br>
    Type of View: $view <br>
    Improvements: <br>
    	Deck: $deck <br>
    	Tiled Floors: $tiledfloors <br>
    	Wood Floors: $woodfloors <br>
    	Fireplace: $fireplace <br>
    Additionals: $additionals <br>
    Property Address: $address <br>
    Property City: $city <br>
    Property Zipcode: $zipcode <br>
    <br>
    Future Planning Tools-
    <br>
    When Are You Looking to Sell: $sell <br>
    Do you Need to Find a New Home: $newhome <br>
    Newsletter: $newsletter <br>
    Comments: $comments <br>
    "; 	 
    
    	$headers = "From: $email\r\n";
    	$headers .= "Content-type: text/html\r\n";
    	$success = mail($webMaster, $emailSubject, $body, $headers);
    
    $theResults="
    <html>
    <head>
    <titlet></title>
    <meta http-equiv='refresh' content='4;URL=/index.html'>
    <style type='text/css'>
    <!--
    body{
        background-color: #cccccc;
        font-style: normal;
        line-height: normal;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 25 px;
        font-color: #000;
        padding-top: 300px;
    }
    -->
    </style>
    </head>
    <div align='center'>Thank you for your interest, your information has been sent and will be answered as soon as possible</div>
    </body>
    </html>
    ";
    echo "$theResults";
    ?>
    Last edited by bos.the.golfer; 12-17-2010 at 11:14 PM. Reason: solved


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •