Jump to content

Help needed please


gazzafm

Recommended Posts

Gday all, Ive developed a form and want the variables including an image upload box to pass to an email. Something is not quiet right with the code. Any help is much appreciated.

 

The html form:

 

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Untitled Page</title>

<meta name="generator" content="WYSIWYG Web Builder - http://www.wysiwygwebbuilder.com">

<style type="text/css">

div#container

{

  width: 800px;

  position: relative;

  margin-top: 0px;

  margin-left: auto;

  margin-right: auto;

  text-align: left;

}

body

{

  text-align: center;

  margin: 0;

}

</style>

</head>

<body bgcolor="#FFFFFF" text="#000000">

<div id="container">

<div id="wb_Html1" style="position:absolute;left:60px;top:202px;width:687px;height:382px;z-index:0" align="left">

<form name="form1" method="post" action="output.php">

 

      <table width="672" cellspacing="0" cellpadding="0">

 

    <tr>

      <td><table width="672" border="0" cellspacing="1" bordercolor="#CCCCCC">

                  <tr bgcolor="#FFFFFF">

                    <td colspan="2">

                      <div align="left"><font color="#0000FF" size="2" face="Arial"><b>  </b></font></div>

 

                      <div align="left"><font color="#006666" size="2" face="Arial">

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Full

                        Name </b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Name" type="text" id="Name" value="" size="40" maxlength="" class="fieldstyle">

                        </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>

                        E-mail Address: *</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left">

                        <input name="email" type="text" id="email" size="40" maxlength="100" class="fieldstyle">

 

                      </div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Home

                        Phone </b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Home_Phone" type="text" id="Home_Phone" value="" size=40" maxlength="" class="fieldstyle">

                        </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Mobile

                        Number</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Mobile_Phone" type="text" id="Mobile_Phone" value="" size="40" maxlength="" class="fieldstyle">

                        </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Mailing

                        Address </b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Mailing_Address" type="text" id="Mailing_Address" value="" size="40" maxlength="" class="fieldstyle">

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>City

                        </b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="City" type="text" id="City" value="" size="40" maxlength="" class="fieldstyle">

 

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>State

                        </b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="State" type="text" id="State" value="" size="40" maxlength="" class="fieldstyle">

 

                        </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Post

                        Code </b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Post_Code" type="text" id="Post_Code" value="" size="40" maxlength="" class="fieldstyle">

                        </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>How

                      much do you pay in site fees per week?</b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input type="radio" name="Site_Fee" value="Less than $100" class="fieldstyle">

                        Below $100 

                        <input type="radio" name="Site_Fee" value="More than $100" class="fieldstyle">

                      Above $100 

                        <input type="radio" name="Site_Fee" value="Over $150" class="fieldstyle">

                        Above $150</font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>What

                        is your timeframe for moving?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <select name="Moving_Time_Frame" id="Moving_Time_Frame" class="fieldstyle">

                          <option value="Within One Month">Within One Month</option>

                          <option value="1 - 2 Months">1 - 2 Months</option>

                          <option value="2 - 6 Months">2 - 6 Months</option>

 

                          <option value="Within One Year">Within One Year</option>

                          <option value="Not Sure">Not Sure</option>

                        </select>

 

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>How

                        many bedrooms do you have?</b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input type="radio" name="Rooms" value="1" class="fieldstyle">

                        1 

                        <input type="radio" name="Rooms" value="2" class="fieldstyle">

 

                        2 

                        <input type="radio" name="Rooms" value="3 or more" class="fieldstyle">

                        3 </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Do

                        you require covered parking?</b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input type="radio" name="Covered_Parking" value="Yes" class="fieldstyle">

                        Yes 

                        <input type="radio" name="Covered_Parking" value="No" class="fieldstyle">

                        No</font></div></td>

 

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>If

                        so, what type?</b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <select name="What_Type" id="What_Type" class="fieldstyle">

                          <option value="Select One">Select One</option>

                          <option value="1 Car">1 Car</option>

 

                          <option value="2 Car">2 Car</option>

                          <option value="Carport">Carport</option>

                          </select>

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Please

                      describe the features of your home and park?</b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <textarea name="Features" cols="40" rows="15" class="fieldstyle" id="Features"></textarea>

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>What

                        price are you selling for?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Price_Selling" type="text" id="Price_Selling" value="" size="40" maxlength="" class="fieldstyle">

 

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Has

                        the park management approved your sale?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input type="radio" name="Approved_For_Sale" value="Yes" class="fieldstyle">

                        Yes 

                        <input type="radio" name="Approved_For_Sale" value="No" class="fieldstyle">

 

                        No</font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Will

                        you assign your lease to new owner?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input type="radio" name="Assign_Lease" value="Yes" class="fieldstyle">

                        Yes 

                        <input type="radio" name="Assign_Lease" value="No" class="fieldstyle">

 

                        No</font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Any

                        other comments regarding your home ?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <textarea name="Comments" cols="40" rows="5" class="fieldstyle" id="Comments"></textarea>

                        </font></div></td>

 

                  </tr>

                  <tr>

                        <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Upload

                        images </b></font>

<br>

<input type="file" name="pictures[]" />

                        <input type="file" name="pictures[]" />

                        <input type="file" name="pictures[]" />

<br>

                        <font size="1" face="Arial, Helvetica, sans-serif">Maximum File Size: 2megs</font></div></td>

 

        </tr>

          </tr>

 

                    <td colspan="2" bgcolor="#FFFFFF"> <div align="center"><br>

                        <input type="submit" name="Submit" value="Submit">

                      </div></td>

                  </tr>

                </table></td>

    </tr>

 

  </table></form></td>

 

    </tr>

  </table>

</div>

</body>

</html>

 

 

The php:

 

<?php

 

// Receiving variables

@$Name = addslashes($_POST['Name']);

@$email = addslashes($_POST['email']);

@$Home_Phone = addslashes($_POST['Home_Phone']);

@$Mobile_Phone = addslashes($_POST['Mobile_Phone']);

@$Mailing_Address = addslashes($_POST['Mailing_Address']);

@$City = addslashes($_POST['City']);

@$State = addslashes($_POST['State']);

@$Post_Code = addslashes($_POST['Post_Code']);

@$Site_Fee = addslashes($_POST['Site_Fee']);

@$Moving_Time_Frame = addslashes($_POST['Moving_Time_Frame']);

@$Rooms = addslashes($_POST['Rooms']);

@$Covered_Parking = addslashes($_POST['Covered_Parking']);

@$What_Type = addslashes($_POST['What_Type']);

@$Features = addslashes($_POST['Features']);

@$Price_Selling = addslashes($_POST['Price_Selling']);

@$Approved_For_Sale = addslashes($_POST['Approved_For_Sale']);

@$Assign_Lease= addslashes($_POST['Assign_Lease']);

@$Comments = addslashes($_POST['Comments']);

foreach ($_FILES["pictures"]["error"] as $key => $error) {

    if ($error == UPLOAD_ERR_OK) {

        $tmp_name = $_FILES["pictures"]["tmp_name"][$key];

        $name = $_FILES["pictures"]["name"][$key];

        move_uploaded_file($tmp_name, "data/$name");

 

// Validation

if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $email))

{

header("Location: error.html");

exit;

}

 

//Sending Email to form owner

# Email to Owner

$pfw_header = "From: $email";

$pfw_subject = "Real Estate Contact Form";

// Change to your email address.........

$pfw_email_to = "webmaster@arpra.org.au";

//......................................

$pfw_message = "Name: $Name\n"

. "email: $email\n"

. "Home_Phone: $Home_Phone\n"

. "Mobile_Phone: $Mobile_Phone\n"

. "Mailing_Address: $Mailing_Address\n"

. "City: $City\n"

. "State: $State\n"

. "Post_Code: $Post_Code\n"

. "Site_Fees: $Site_Fees\n"

. "Moving_Time_Frame: $Moving_Time_Frame\n"

. "Rooms: $Rooms\n"

. "Covered_Parking: $Covered_Parking\n"

. "What_Type: $What_Type\n"

. "Features: $Features\n"

. "Price_Selling: $Price_Selling\n"

. "Approved_For_Sale: $Approved_For_Sale\n"

. "Assign_Lease: $Assign_Lease\n"

. "Comments: $Comments\n"

. "\n";

@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

 

//Sending auto respond Email to user

# Email to Owner

// Change to your email address.........

$pfw_header = "From: webmaster@arpra.org.au";

//......................................

$pfw_subject = "Confirmation Auto - Response";

$pfw_message = "Name: $Name\n"

. "email: $email\n"

. "Home_Phone: $Home_Phone\n"

. "Mobile_Phone: $Mobile_Phone\n"

. "Mailing_Address: $Mailing_Address\n"

. "City: $City\n"

. "State: $State\n"

. "Post_Code: $Post_Code\n"

. "Site_Fees: $Site_Fees\n"

. "Moving_Time_Frame: $Moving_Time_Frame\n"

. "Rooms: $Rooms\n"

. "Covered_Parking: $Covered_Parking\n"

. "What_Type: $What_Type\n"

. "Features: $Features\n"

. "Price_Selling: $Price_Selling\n"

. "Approved_For_Sale: $Approved_For_Sale\n"

. "Assign_Lease: $Assign_Lease\n"

. "Comments: $Comments\n"

@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

 

header("Location: thank_you.html");

 

?>

 

Any ideas would be great.

Link to comment
Share on other sites

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Untitled Page</title>
<meta name="generator" content="WYSIWYG Web Builder - http://www.wysiwygwebbuilder.com">
<style type="text/css">
div#container
{
   width: 800px;
   position: relative;
   margin-top: 0px;
   margin-left: auto;
   margin-right: auto;
   text-align: left;
}
body
{
   text-align: center;
   margin: 0;
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="container">
<div id="wb_Html1" style="position:absolute;left:60px;top:202px;width:687px;height:382px;z-index:0" align="left">
<form name="form1" method="post" action="output.php">

       <table width="672" cellspacing="0" cellpadding="0">

    <tr>
      <td><table width="672" border="0" cellspacing="1" bordercolor="#CCCCCC">
                  <tr bgcolor="#FFFFFF">
                    <td colspan="2">
                      <div align="left"><font color="#0000FF" size="2" face="Arial"><b>  </b></font></div>

                      <div align="left"><font color="#006666" size="2" face="Arial">
                        </font></div></td>
                  </tr>
                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Full
                        Name </b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input name="Name" type="text" id="Name" value="" size="40" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>

                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>
                        E-mail Address: *</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left">
                        <input name="email" type="text" id="email" size="40" maxlength="100" class="fieldstyle">

                      </div></td>
                  </tr>
                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Home
                        Phone </b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input name="Home_Phone" type="text" id="Home_Phone" value="" size=40" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>

                   <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Mobile
                        Number</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input name="Mobile_Phone" type="text" id="Mobile_Phone" value="" size="40" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>

                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Mailing
                        Address </b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input name="Mailing_Address" type="text" id="Mailing_Address" value="" size="40" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>
                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>City
                        </b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input name="City" type="text" id="City" value="" size="40" maxlength="" class="fieldstyle">

                        </font></div></td>
                  </tr>
                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>State
                        </b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input name="State" type="text" id="State" value="" size="40" maxlength="" class="fieldstyle">

                        </font></div></td>
                  </tr>

                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Post
                        Code </b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input name="Post_Code" type="text" id="Post_Code" value="" size="40" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>

                   <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>How
                       much do you pay in site fees per week?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input type="radio" name="Site_Fee" value="Less than $100" class="fieldstyle">
                        Below $100 
                        <input type="radio" name="Site_Fee" value="More than $100" class="fieldstyle">
                       Above $100 
                        <input type="radio" name="Site_Fee" value="Over $150" class="fieldstyle">
                        Above $150</font></div></td>
                  </tr>

                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>What
                        is your timeframe for moving?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <select name="Moving_Time_Frame" id="Moving_Time_Frame" class="fieldstyle">
                          <option value="Within One Month">Within One Month</option>
                          <option value="1 - 2 Months">1 - 2 Months</option>
                          <option value="2 - 6 Months">2 - 6 Months</option>

                          <option value="Within One Year">Within One Year</option>
                          <option value="Not Sure">Not Sure</option>
                        </select>

                        </font></div></td>
                  </tr>
                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>How
                        many bedrooms do you have?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input type="radio" name="Rooms" value="1" class="fieldstyle">
                        1 
                        <input type="radio" name="Rooms" value="2" class="fieldstyle">

                        2 
                        <input type="radio" name="Rooms" value="3 or more" class="fieldstyle">
                        3 </font></div></td>
                  </tr>

                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Do
                        you require covered parking?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input type="radio" name="Covered_Parking" value="Yes" class="fieldstyle">
                        Yes 
                        <input type="radio" name="Covered_Parking" value="No" class="fieldstyle">
                        No</font></div></td>

                  </tr>
                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>If
                        so, what type?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <select name="What_Type" id="What_Type" class="fieldstyle">
                          <option value="Select One">Select One</option>
                          <option value="1 Car">1 Car</option>

                          <option value="2 Car">2 Car</option>
                          <option value="Carport">Carport</option>
                          </select>
                        </font></div></td>
                  </tr>
                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Please
                       describe the features of your home and park?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <textarea name="Features" cols="40" rows="15" class="fieldstyle" id="Features"></textarea>
                        </font></div></td>
                  </tr>
                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>What
                        price are you selling for?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input name="Price_Selling" type="text" id="Price_Selling" value="" size="40" maxlength="" class="fieldstyle">

                        </font></div></td>
                  </tr>
                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Has
                        the park management approved your sale?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input type="radio" name="Approved_For_Sale" value="Yes" class="fieldstyle">
                        Yes 
                        <input type="radio" name="Approved_For_Sale" value="No" class="fieldstyle">

                        No</font></div></td>
                  </tr>
                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Will
                        you assign your lease to new owner?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <input type="radio" name="Assign_Lease" value="Yes" class="fieldstyle">
                        Yes 
                        <input type="radio" name="Assign_Lease" value="No" class="fieldstyle">

                        No</font></div></td>
                  </tr>
                  <tr>
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Any
                        other comments regarding your home ?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">
                        <textarea name="Comments" cols="40" rows="5" class="fieldstyle" id="Comments"></textarea>
                        </font></div></td>

                  </tr>
                  <tr>
                        <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Upload
                        images </b></font>
<br>
<input type="file" name="pictures[]" />
                        <input type="file" name="pictures[]" />
                        <input type="file" name="pictures[]" />
<br>
                        <font size="1" face="Arial, Helvetica, sans-serif">Maximum File Size: 2megs</font></div></td>

        </tr>
          </tr>

                    <td colspan="2" bgcolor="#FFFFFF"> <div align="center"><br>
                        <input type="submit" name="Submit" value="Submit">
                      </div></td>
                  </tr>
                </table></td>
    </tr>

  </table></form></td>

    </tr>
  </table>
</div>
</body>
</html>

 

<?php

// Receiving variables
@$Name = addslashes($_POST['Name']);
@$email = addslashes($_POST['email']);
@$Home_Phone = addslashes($_POST['Home_Phone']);
@$Mobile_Phone = addslashes($_POST['Mobile_Phone']);
@$Mailing_Address = addslashes($_POST['Mailing_Address']);
@$City = addslashes($_POST['City']);
@$State = addslashes($_POST['State']);
@$Post_Code = addslashes($_POST['Post_Code']);
@$Site_Fee = addslashes($_POST['Site_Fee']);
@$Moving_Time_Frame = addslashes($_POST['Moving_Time_Frame']);
@$Rooms = addslashes($_POST['Rooms']);
@$Covered_Parking = addslashes($_POST['Covered_Parking']);
@$What_Type = addslashes($_POST['What_Type']);
@$Features = addslashes($_POST['Features']);
@$Price_Selling = addslashes($_POST['Price_Selling']);
@$Approved_For_Sale = addslashes($_POST['Approved_For_Sale']);
@$Assign_Lease= addslashes($_POST['Assign_Lease']);
@$Comments = addslashes($_POST['Comments']);
foreach ($_FILES["pictures"]["error"] as $key => $error) {
    if ($error == UPLOAD_ERR_OK) {
        $tmp_name = $_FILES["pictures"]["tmp_name"][$key];
        $name = $_FILES["pictures"]["name"][$key];
        move_uploaded_file($tmp_name, "data/$name");

// Validation
if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $email))
{
header("Location: error.html");
exit;
}

//Sending Email to form owner
# Email to Owner
$pfw_header = "From: $email";
$pfw_subject = "Real Estate Contact Form";
// Change to your email address.........
$pfw_email_to = "webmaster@arpra.org.au";
//......................................
$pfw_message = "Name: $Name\n"
. "email: $email\n"
. "Home_Phone: $Home_Phone\n"
. "Mobile_Phone: $Mobile_Phone\n"
. "Mailing_Address: $Mailing_Address\n"
. "City: $City\n"
. "State: $State\n"
. "Post_Code: $Post_Code\n"
. "Site_Fees: $Site_Fees\n"
. "Moving_Time_Frame: $Moving_Time_Frame\n"
. "Rooms: $Rooms\n"
. "Covered_Parking: $Covered_Parking\n"
. "What_Type: $What_Type\n"
. "Features: $Features\n"
. "Price_Selling: $Price_Selling\n"
. "Approved_For_Sale: $Approved_For_Sale\n"
. "Assign_Lease: $Assign_Lease\n"
. "Comments: $Comments\n"
. "\n";
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

//Sending auto respond Email to user
# Email to Owner
// Change to your email address.........
$pfw_header = "From: webmaster@arpra.org.au";
//......................................
$pfw_subject = "Confirmation Auto - Response";
$pfw_message = "Name: $Name\n"
. "email: $email\n"
. "Home_Phone: $Home_Phone\n"
. "Mobile_Phone: $Mobile_Phone\n"
. "Mailing_Address: $Mailing_Address\n"
. "City: $City\n"
. "State: $State\n"
. "Post_Code: $Post_Code\n"
. "Site_Fees: $Site_Fees\n"
. "Moving_Time_Frame: $Moving_Time_Frame\n"
. "Rooms: $Rooms\n"
. "Covered_Parking: $Covered_Parking\n"
. "What_Type: $What_Type\n"
. "Features: $Features\n"
. "Price_Selling: $Price_Selling\n"
. "Approved_For_Sale: $Approved_For_Sale\n"
. "Assign_Lease: $Assign_Lease\n"
. "Comments: $Comments\n"
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

header("Location: thank_you.html");

?>

 

Firstly this isnt the  "entire site" its the one relevant page, i assumed it might be of relevance to those that might be able to help, not those that may wish to simply tell me to do stuff. Secondly i included the relevant php in the event that that might be helpful as well. The form submits but dosnt upload the images. My computer does not explode as the previous poster suggests.

 

Again thanks for any Help, not criticism of the way i may have posted.

Link to comment
Share on other sites

Firstly this isnt the  "entire site" its the one relevant page, i assumed it might be of relevance to those that might be able to help, not those that may wish to simply tell me to do stuff. Secondly i included the relevant php in the event that that might be helpful as well. The form submits but dosnt upload the images. My computer does not explode as the previous poster suggests.

 

Again thanks for any Help, not criticism of the way i may have posted.

 

Ok, I would like to recommend that you find a sense of humor if you wish to post on this board. If you have real thin skin, then you will find a lot of folks to be jerks when in actuality just having a little fun. We donate our time and like to be a little humorous about things sometimes.

 

The reason I "told you" to do those things because there are certain things we like to see in order to help folks.

 

The first of them is place code in code tags. It color codes PHP which is helpful, and also puts a gray background to it making it easier to read.

 

I understand that it was not the entire site. But it is a lot of code with no input as to what is not working.

 

You still have not really given much information. Can you tell us what steps you have taken to try to fix it (so we don't duplicate them or suggest them), do you get any errors (not likely since your suppressing them so heavily)

 

I realize that your computer does not explode... joke... I mean if your computer exploded, how would you ask your questions?  I would hope that if your computer did explode, you would call 911 or an exorcist or someone rather than asking for help here. :)

 

foreach ($_FILES["pictures"]["error"] as $key => $error) {
    if ($error == UPLOAD_ERR_OK) {
        $tmp_name = $_FILES["pictures"]["tmp_name"][$key];
        $name = $_FILES["pictures"]["name"][$key];
        move_uploaded_file($tmp_name, "data/$name");

 

What do you get when you echo $key and $error inside the foreach statement? That bit of code just don't look right to me.

 

Nate

Link to comment
Share on other sites

My apologies , i do have a sense of humour, im just very frustrated at the code, not being an expert in coding at all, im managing to wing my way through,im a chef, not a webdesigner however i am trying to make this form for an elderly residence group and am just frustrated at the "code speak" that really makes no sense in my head. Thats why i was asking for help.

 

I may just have to pay a designer for this stuff as im not technically trained.

 

 

Thanks for the suggestions...i have no idea what suppression means and echo, well not in the computing sense.

 

Thank you

Link to comment
Share on other sites

No problem, I understand frustration when your learning.

 

Here is what I found before you posted your reply.... I will post again after. Gimme a minute and I will get it working for ya.

 

<?php
if(isset($_POST['submit']))
{
foreach ($_FILES["pictures"]["error"] as $key => $error) 
{
	 if ($error == UPLOAD_ERR_OK) 
	 {
		  $tmp_name = $_FILES["pictures"]["tmp_name"][$key];
		  $name = $_FILES["pictures"]["name"][$key];
		 #move_uploaded_file($tmp_name, "data/$name");

		 echo $key .' - '. $error.'<br>';
	}
}
}	  
?>

<form method="post">

<input type="file" name="pictures[]" />
<input type="file" name="pictures[]" />
<input type="file" name="pictures[]" />

<input type="submit" value="Submit" name="submit" id="submit" />

</form>

 

When I run this on my server, I get the following error.

 

Warning: Invalid argument supplied for foreach() in /homepages/24/d150919797/htdocs/cts/test.php on line 4

 

I did not think that looked right.

 

I did some checking.... add this to your form tag.

 

<form enctype="multipart/form-data" ....... >

 

When I run this (I changed the name to picture instead of pictures.. no real reason though.)

foreach ($_FILES["picture"]['error'] as $key => $error) 
{
	if ($error == UPLOAD_ERR_OK)
	{
	  $tmp_name = $_FILES["pictures"]["tmp_name"][$key];
	  $name = $_FILES["pictures"]["name"][$key];
	  move_uploaded_file($tmp_name, "data/$name");
	}
	echo $key.' - '.$error.'<br>';
}

 

 

$key and $error are simply numbers. The echo above gives this

 

0 - 0

1 - 0

2 - 0

 

So you need to change your foreach to a valid array and then it might work.

 

Link to comment
Share on other sites

LOL chronister,

Understand the frustration, everyone on this board has been there. It's alot like the new guy coming into your restaurant and looks at you will a blank stare when you use words and phrases like Back of House, happy campers, cowboy chef, shoemaker, and my favorite the Chinese Microwave. He has no clue what your talking about.

 

Anyway when you use the 'at symbol' @ in php it will suppress(prevent reporting) any errors the expression following it may throw. It is a very rare circumstance that you would do this, especially when your developing code. Hard to fix errors if you suppressed them and don't know what they are. I would go so far as to say someone learning PHP should never use it. 

Link to comment
Share on other sites

A valid array is just that, an array of data. The foreach statement accepts an array and loops through them.

 

<?php

$array = array('item1', 'item2', 'item3');

foreach($array as $key=>$value)
{
   echo $key.' - '. $value.'<br>';
}
?>

will output....

 

0 - item1

1 - item2

3 - item3

 

What you were passing into the foreach statement is not a valid array meaning it is not a container for multiple items of data.

 

Error suppressing is when you stop errors from printing on screen. In a live environment (live website) you want errors suppressed so your users don't see ugly error messages like the one I posted. IT shows a blank screen with this error and nothing else... not good for the users to see it..

Warning: Invalid argument supplied for foreach() in /homepages/24/d150919797/htdocs/cts/test.php on line 4

 

The @ symbol keeps errors from displaying on screen.

 

The text inputs will not "pass to email", you do that in your script. Your doing that in these lines...

 

@$Name = addslashes($_POST['Name']);

Then below that in the $pfw_message variable, your using those items to send them in the email message.

 

 

For your form, change

 

<form name="form1" method="post" action="output.php">

 

to

 

<form name="form1" method="post" action="output.php" enctype="multipart/form-data">

 

Then change the

<input type="file" name="pictures[]" />
<input type="file" name="pictures[]" />
<input type="file" name="pictures[]" />

 

to

 

<input type="file" name="picture1" />
<input type="file" name="picture2" />
<input type="file" name="picture3" />

 

Then change

 

foreach ($_FILES["pictures"]["error"] as $key => $error) {
    if ($error == UPLOAD_ERR_OK) {
        $tmp_name = $_FILES["pictures"]["tmp_name"][$key];
        $name = $_FILES["pictures"]["name"][$key];
        move_uploaded_file($tmp_name, "data/$name");

 

to

 

	if(isset($_FILES['picture1']['tmp_name']))
{
	  $tmp_name1 = $_FILES["picture1"]["tmp_name"];
  		  $name1 = $_FILES["picture1"]["name"];
	  
	  if(!move_uploaded_file($tmp_name1, "data/$name1"))
	  {
	  		$error1 = 'Could not move file 1';
	  }
}

if(isset($_FILES['picture2']['tmp_name']))
{
	$tmp_name2 = $_FILES["picture2"]["tmp_name"];
	$name2 = $_FILES["picture2"]["name"];
	 if(!move_uploaded_file($tmp_name2, "data/$name2"))
	 {
		$error2 = 'Could not move file 2';
	 }
}

if(isset($_FILES['picture2']['tmp_name']))
{
	$tmp_name3 = $_FILES["picture3"]["tmp_name"];
	$name3 = $_FILES["picture3"]["name"];
	  
	if(!move_uploaded_file($tmp_name3, "data/$name3"))
	{
		$error3 = 'Could not move file 3';
	}

 

Be careful though and test when done, I can't see where the foreach closing bracket is or where the if($error.....) closing bracket is, so there may be errors. Try that and lemme know what you get.

 

To explain, I removed the pictures from the array and deal with them individually. More lines of code, but easier to deal with. I also added an error message. If the moving part don't work, then it will set $error to a message.

 

If it don't seem to be working add this at the end of the last bit of code I gave ya....

 

echo 'Error1: '. $error1.'<br>Error2: '. $error2.'<br>Error3: '.$error3.'<br>'; 

 

Lemme know how this works for ya.

 

Maybe when this is all done you can point me to a recipe for a great tomato based pasta sauce. The canned and jarred crap isn't tasting very good any more no matter what brand I try. :)

 

(I think this is the longest freaking post I have ever made :) )

Nate

Link to comment
Share on other sites

Hi again, sorry i didnt reply till now i was cheffing last night

 

Im sure able to give you a few great recipes for tomato based sauce.

 

I did the changes and when i clicked submit it bought up a blank white page with the address www.arpra.org.au/output.php

 

ive looked at the refence in the form but cant see what ive done there

 

 

Link to comment
Share on other sites

The forms action is output.php. So I am guessing that all the PHP code is on output.php?

 

There is probably an error at some point.

 

At the top of output.php add this line....

 

ini_set('error_reporting', E_ALL);

 

This will hopefully give you an error message telling you what is wrong.

 

I am going to guess that the error message will be something along the lines of unexpected $end in output.php line........ something like that.

 

I would go through and remove all of those @ signs too. Those are really not needed. They will suppress any E_NOTICE errors, which is easily done with the ini_set() line I gave you plus a little modification.

 

Nate

Link to comment
Share on other sites

<?php
ini_set('error_reporting', E_ALL);
// Receiving variables
$Name = addslashes($_POST['Name']);
$email = addslashes($_POST['email']);
$Home_Phone = addslashes($_POST['Home_Phone']);
$Mobile_Phone = addslashes($_POST['Mobile_Phone']);
$Mailing_Address = addslashes($_POST['Mailing_Address']);
$City = addslashes($_POST['City']);
$State = addslashes($_POST['State']);
$Post_Code = addslashes($_POST['Post_Code']);
$Site_Fee = addslashes($_POST['Site_Fee']);
$Moving_Time_Frame = addslashes($_POST['Moving_Time_Frame']);
$Rooms = addslashes($_POST['Rooms']);
$Covered_Parking = addslashes($_POST['Covered_Parking']);
$What_Type = addslashes($_POST['What_Type']);
$Features = addslashes($_POST['Features']);
$Price_Selling = addslashes($_POST['Price_Selling']);
$Approved_For_Sale = addslashes($_POST['Approved_For_Sale']);
$Assign_Lease= addslashes($_POST['Assign_Lease']);
$Comments = addslashes($_POST['Comments']);
if(isset($_FILES['picture1']['tmp_name']))
   {
        $tmp_name1 = $_FILES["picture1"]["tmp_name"];
          $name1 = $_FILES["picture1"]["name"];
       
        if(!move_uploaded_file($tmp_name1, "data/$name1"))
        {
              $error1 = 'Could not move file 1';
        }
   }
   
   if(isset($_FILES['picture2']['tmp_name']))
   {
      $tmp_name2 = $_FILES["picture2"]["tmp_name"];
      $name2 = $_FILES["picture2"]["name"];
       if(!move_uploaded_file($tmp_name2, "data/$name2"))
       {
         $error2 = 'Could not move file 2';
       }
   }

   if(isset($_FILES['picture2']['tmp_name']))
   {
      $tmp_name3 = $_FILES["picture3"]["tmp_name"];
      $name3 = $_FILES["picture3"]["name"];
       
      if(!move_uploaded_file($tmp_name3, "data/$name3"))
      {
         $error3 = 'Could not move file 3';
      }
   }
// Validation
if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', 

$email))
{
header("Location: error.html");
exit;
}

//Sending Email to form owner
# Email to Owner 
$pfw_header = "From: $email";
$pfw_subject = "Real Estate Contact Form";
// Change to your email address.........
$pfw_email_to = "webmaster@arpra.org.au";
//......................................
$pfw_message = "Name: $Name\n"
. "email: $email\n"
. "Home_Phone: $Home_Phone\n"
. "Mobile_Phone: $Mobile_Phone\n"
. "Mailing_Address: $Mailing_Address\n"
. "City: $City\n"
. "State: $State\n"
. "Post_Code: $Post_Code\n"
. "Site_Fees: $Site_Fees\n"
. "Moving_Time_Frame: $Moving_Time_Frame\n"
. "Rooms: $Rooms\n"
. "Covered_Parking: $Covered_Parking\n"
. "What_Type: $What_Type\n"
. "Features: $Features\n"
. "Price_Selling: $Price_Selling\n"
. "Approved_For_Sale: $Approved_For_Sale\n"
. "Assign_Lease: $Assign_Lease\n"
. "Comments: $Comments\n"
. "\n";
mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

//Sending auto respond Email to user
# Email to Owner 
// Change to your email address.........
$pfw_header = "From: webmaster@arpra.org.au";
//......................................
$pfw_subject = "Confirmation Auto - Response";
$pfw_message = "Name: $Name\n"
. "email: $email\n"
. "Home_Phone: $Home_Phone\n"
. "Mobile_Phone: $Mobile_Phone\n"
. "Mailing_Address: $Mailing_Address\n"
. "City: $City\n"
. "State: $State\n"
. "Post_Code: $Post_Code\n"
. "Site_Fees: $Site_Fees\n"
. "Moving_Time_Frame: $Moving_Time_Frame\n"
. "Rooms: $Rooms\n"
. "Covered_Parking: $Covered_Parking\n"
. "What_Type: $What_Type\n"
. "Features: $Features\n"
. "Price_Selling: $Price_Selling\n"
. "Approved_For_Sale: $Approved_For_Sale\n"
. "Assign_Lease: $Assign_Lease\n"
. "Comments: $Comments\n"
mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

header("Location: thank_you.html");

?>

Link to comment
Share on other sites

I added that to the output.php code but it makes no difference, iall i get after clicking submit is a white page with  the same www adddy as previous. It dosnt go to a thankyou page or anywhere.

I know you have spent alot of ur time on this, i suspect its just one of those things that wont work given the need for text and images to upload at the same time.

 

Thank you

Link to comment
Share on other sites

It should work, there is no problem with a form dealing with multiple items like this. There is just something we're missing.

 

When I get to this point in my scripts, I generally echo out things to see where the script is breaking.

 

What I mean by that is find places in the script where you have if statements, inside that if statement, add something like this..

 

if(isset($_FILES['picture1']['tmp_name']))
{
   echo 'picture1 is set';

 

I cut off the rest of the code, but hopefully this makes sense. Go through and 1 by 1, add a line to each if statement to see where it is failing.

 

If you don't get the message you entered, then that part is failing. This can be a life saver when unexpected results creep up.

 

It is almost 3 am and I am going to bed now... :)

 

Try that and lemme know what you get. I will take a look in the morning.

 

On a side note, it "appears" that your company is in the same neck of the woods as TADNSW (Technical Aid for the Disabled NSW) www.tadnsw.org.au. It also looks like you *may* be in the same type of services. I did some work for them. They needed a members area with document management based on levels. Pretty cool project and very nice people. :)

Link to comment
Share on other sites

This may be of interest

 

I am posting two lots of code, the first is php that works. It does not include any image upload. Just straight form submission and includes the @ symbol. I tried this with the original template it came with and after submit i got the thank you page and then in my email i recieved the submitted info.

 

<?php

// Receiving variables
@$Name = addslashes($_POST['Name']);
@$email = addslashes($_POST['email']);
@$Home_Phone = addslashes($_POST['Home_Phone']);
@$Business_Phone = addslashes($_POST['Business_Phone']);
@$Mobile_Phone = addslashes($_POST['Mobile_Phone']);
@$Mailing_Address = addslashes($_POST['Mailing_Address']);
@$City = addslashes($_POST['City']);
@$State = addslashes($_POST['State']);
@$Zip_Code = addslashes($_POST['Zip_Code']);
@$Preferred_School = addslashes($_POST['Preferred_School']);
@$Own_or_Rent = addslashes($_POST['Own_or_Rent']);
@$Moving_Time_Frame = addslashes($_POST['Moving_Time_Frame']);
@$Rooms_Needed = addslashes($_POST['Rooms_Needed']);
@$Bathrooms_Needed = addslashes($_POST['Bathrooms_Needed']);
@$Covered_Parking = addslashes($_POST['Covered_Parking']);
@$What_Type = addslashes($_POST['What_Type']);
@$Special_Features = addslashes($_POST['Special_Features']);
@$Price_Considering = addslashes($_POST['Price_Considering']);
@$Approved_For_Mortgage = addslashes($_POST['Approved_For_Mortgage']);
@$Sell_A_Home_Before_Buy = addslashes($_POST['Sell_A_Home_Before_Buy']);
@$Comments = addslashes($_POST['Comments']);

// Validation
if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $email))
{
header("Location: error.html");
exit;
}

//Sending Email to form owner
# Email to Owner 
$pfw_header = "From: $email";
$pfw_subject = "My Real Estate Contact Form";
// Change to your email address.........
$pfw_email_to = "mail@garymartin.info";
//......................................
$pfw_message = "Name: $Name\n"
. "email: $email\n"
. "Home_Phone: $Home_Phone\n"
. "Business_Phone: $Business_Phone\n"
. "Mobile_Phone: $Mobile_Phone\n"
. "Mailing_Address: $Mailing_Address\n"
. "City: $City\n"
. "State: $State\n"
. "Zip_Code: $Zip_Code\n"
. "Preferred_School: $Preferred_School\n"
. "Own_or_Rent: $Own_or_Rent\n"
. "Moving_Time_Frame: $Moving_Time_Frame\n"
. "Rooms_Needed: $Rooms_Needed\n"
. "Bathrooms_Needed: $Bathrooms_Needed\n"
. "Covered_Parking: $Covered_Parking\n"
. "What_Type: $What_Type\n"
. "Special_Features: $Special_Features\n"
. "Price_Considering: $Price_Considering\n"
. "Approved_For_Mortgage: $Approved_For_Mortgage\n"
. "Sell_A_Home_Before_Buy: $Sell_A_Home_Before_Buy\n"
. "Comments: $Comments\n"
. "\n";
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

//Sending auto respond Email to user
# Email to Owner 
// Change to your email address.........
$pfw_header = "From: mail@garymartin.info";
//......................................
$pfw_subject = "Confirmation Auto - Response";
$pfw_email_to = "$email";
$pfw_message = "Name: $Name\n"
. "email: $email\n"
. "Home_Phone: $Home_Phone\n"
. "Business_Phone: $Business_Phone\n"
. "Mobile_Phone: $Mobile_Phone\n"
. "Mailing_Address: $Mailing_Address\n"
. "City: $City\n"
. "State: $State\n"
. "Zip_Code: $Zip_Code\n"
. "Preferred_School: $Preferred_School\n"
. "Own_or_Rent: $Own_or_Rent\n"
. "Moving_Time_Frame: $Moving_Time_Frame\n"
. "Rooms_Needed: $Rooms_Needed\n"
. "Bathrooms_Needed: $Bathrooms_Needed\n"
. "Covered_Parking: $Covered_Parking\n"
. "What_Type: $What_Type\n"
. "Special_Features: $Special_Features\n"
. "Price_Considering: $Price_Considering\n"
. "Approved_For_Mortgage: $Approved_For_Mortgage\n"
. "Sell_A_Home_Before_Buy: $Sell_A_Home_Before_Buy\n"
. "Comments: $Comments\n"
. "\n";
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

header("Location: thank_you.html");

?>

 

So here is the code of the original template, i simply removed some of the not needed text inputs.

 

html>
<head>
<title>Real Estate Contact Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#8080FF">
<div align="center"> 
<br>
  <table width="672" cellspacing="0" cellpadding="0">
    <tr>
      <td> <form name="form1" method="post" action="output.php">

    <table width="672" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="header.jpg" width="674" height="197"></td>
      </tr>
    </table>
   
    <table width="672" cellspacing="0" cellpadding="0">
    <tr>
      <td><table width="672" border="0" cellspacing="1" bordercolor="#CCCCCC">
                  <tr bgcolor="#FFFFFF"> 
                    <td colspan="2"> 
                      <div align="left"><font color="#0000FF" size="2" face="Arial"><b>  </b></font></div>

                      <div align="left"><font color="#006666" size="2" face="Arial"> 
                        </font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Full 
                        Name </b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input name="Name" type="text" id="Name" value="" size="25" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>

                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b> 
                        E-mail Address: *</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"> 
                        <input name="email" type="text" id="email" size="20" maxlength="100" class="fieldstyle">
                      </div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Home 
                        Phone </b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input name="Home_Phone" type="text" id="Home_Phone" value="" size="12" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Business 
                        Phone</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input name="Business_Phone" type="text" id="Business_Phone" value="" size="12" maxlength="" class="fieldstyle">

                        </font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Mobile 
                        Number</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input name="Mobile_Phone" type="text" id="Mobile_Phone" value="" size="12" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>

                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Mailing 
                        Address </b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input name="Mailing_Address" type="text" id="Mailing_Address" value="" size="25" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>City 
                        </b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input name="City" type="text" id="City" value="" size="25" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>State 
                        </b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input name="State" type="text" id="State" value="" size="2" maxlength="2" class="fieldstyle">

                        </font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Zip 
                        Code </b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input name="Zip_Code" type="text" id="Zip_Code" value="" size="10" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>

                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Do 
                        you have a preferred school district?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input name="Preferred_School" type="text" id="Preferred_School" value="" size="25" maxlength="" class="fieldstyle">
                        </font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Do 
                        you currently own or rent?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input type="radio" name="Own_or_Rent" value="Own" class="fieldstyle">
                        Own  
                        <input type="radio" name="Own_or_Rent" value="Rent" class="fieldstyle">
                        Rent  
                        <input type="radio" name="Own_or_Rent" value="Other" class="fieldstyle">
                        Other</font></div></td>
                  </tr>

                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>What 
                        is your timeframe for moving?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <select name="Moving_Time_Frame" id="Moving_Time_Frame" class="fieldstyle">
                          <option value="Select One">Select One</option>
                          <option value="Within One Week">Within One Week</option>
                          <option value="Two Weeks or Less">Two Weeks or Less</option>

                          <option value="Within One Month">Within One Month</option>
                          <option value="1 - 2 Months">1 - 2 Months</option>
                          <option value="2 - 6 Months">2 - 6 Months</option>
                          <option value="Within One Year">Within One Year</option>
                          <option value="Not Sure">Not Sure</option>
                        </select>

                        </font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>How 
                        many bedrooms do you need?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input type="radio" name="Rooms_Needed" value="1" class="fieldstyle">
                        1  
                        <input type="radio" name="Rooms_Needed" value="2" class="fieldstyle">

                        2  
                        <input type="radio" name="Rooms_Needed" value="3" class="fieldstyle">
                        3  
                        <input type="radio" name="Rooms_Needed" value="4" class="fieldstyle">
                        4  
                        <input type="radio" name="Rooms_Needed" value="5 or More" class="fieldstyle">
                        5 or More</font></div></td>
                  </tr>

                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>How 
                        many bathrooms do you need?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input type="radio" name="Bathrooms_Needed" value="1" class="fieldstyle">
                        1  
                        <input type="radio" name="Bathrooms_Needed" value="1 1/2" class="fieldstyle">
                        1 1/2  
                        <input type="radio" name="Bathrooms_Needed" value="2" class="fieldstyle">

                        2  
                        <input type="radio" name="Bathrooms_Needed" value="2 1/2" class="fieldstyle">
                        2 1/2  
                        <input type="radio" name="Bathrooms_Needed" value="3 or More" class="fieldstyle">
                        3 or More</font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Do 
                        you require covered parking?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input type="radio" name="Covered_Parking" value="Yes" class="fieldstyle">
                        Yes  
                        <input type="radio" name="Covered_Parking" value="No" class="fieldstyle">
                        No</font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>If 
                        so, what type?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <select name="What_Type" id="What_Type" class="fieldstyle">
                          <option value="Select One">Select One</option>
                          <option value="1 Car">1 Car</option>
                          <option value="2 Car">2 Car</option>
                          <option value="3 Car or Larger">3 Car or Larger</option>
                          <option value="Carport">Carport</option>

                          <option value="Detached Garage">Detached Garage</option>
                          <option value="Attached Garage">Attached Garage</option>
                        </select>
                        </font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Are 
                        you looking for any special features in a new home?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <textarea name="Special_Features" cols="25" rows="5" class="fieldstyle" id="Special_Features"></textarea>
                        </font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>What 
                        price are you considering?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input name="Price_Considering" type="text" id="Price_Considering" value="" size="10" maxlength="" class="fieldstyle">

                        </font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Have 
                        you been approved for a mortgage?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input type="radio" name="Approved_For_Mortgage" value="Yes" class="fieldstyle">
                        Yes  
                        <input type="radio" name="Approved_For_Mortgage" value="No" class="fieldstyle">

                        No</font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Do 
                        you need to sell a home before you buy?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <input type="radio" name="Sell_A_Home_Before_Buy" value="Yes" class="fieldstyle">
                        Yes  
                        <input type="radio" name="Sell_A_Home_Before_Buy" value="No" class="fieldstyle">

                        No</font></div></td>
                  </tr>
                  <tr> 
                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Any 
                        other comments regarding your home search?</b></font></div></td>
                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial"> 
                        <textarea name="Comments" cols="25" rows="5" class="fieldstyle" id="Comments"></textarea>
                        </font></div></td>

                  </tr>
                  <tr> 
                    <td colspan="2" bgcolor="#FFFFFF"> <div align="center"><br>
                        <input type="submit" name="Submit" value="Submit">
                      </div></td>
                  </tr>
                </table></td>
    </tr>
  </table></form></td>

    </tr>
  </table>
</div>
</body>
</html>

 

here is my html form as modified

 

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Untitled Page</title>

<meta name="generator" content="WYSIWYG Web Builder - http://www.wysiwygwebbuilder.com">

<style type="text/css">

div#container

{

  width: 800px;

  position: relative;

  margin-top: 0px;

  margin-left: auto;

  margin-right: auto;

  text-align: left;

}

body

{

  text-align: center;

  margin: 0;

}

</style>

</head>

<body bgcolor="#FFFFFF" text="#000000">

<div id="container">

<div id="wb_Html1" style="position:absolute;left:60px;top:202px;width:687px;height:382px;z-index:0" align="left">

<form name="form1" method="post" action="output.php" enctype="multipart/form-data">

 

      <table width="672" cellspacing="0" cellpadding="0">

 

    <tr>

      <td><table width="672" border="0" cellspacing="1" bordercolor="#CCCCCC">

                  <tr bgcolor="#FFFFFF">

                    <td colspan="2">

                      <div align="left"><font color="#0000FF" size="2" face="Arial"><b>  </b></font></div>

 

                      <div align="left"><font color="#006666" size="2" face="Arial">

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Full

                        Name </b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Name" type="text" id="Name" value="" size="40" maxlength="" class="fieldstyle">

                        </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>

                        E-mail Address: *</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left">

                        <input name="email" type="text" id="email" size="40" maxlength="100" class="fieldstyle">

 

                      </div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Home

                        Phone </b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Home_Phone" type="text" id="Home_Phone" value="" size=40" maxlength="" class="fieldstyle">

                        </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Mobile

                        Number</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Mobile_Phone" type="text" id="Mobile_Phone" value="" size="40" maxlength="" class="fieldstyle">

                        </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Mailing

                        Address </b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Mailing_Address" type="text" id="Mailing_Address" value="" size="40" maxlength="" class="fieldstyle">

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>City

                        </b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="City" type="text" id="City" value="" size="40" maxlength="" class="fieldstyle">

 

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>State

                        </b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="State" type="text" id="State" value="" size="40" maxlength="" class="fieldstyle">

 

                        </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Post

                        Code </b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Post_Code" type="text" id="Post_Code" value="" size="40" maxlength="" class="fieldstyle">

                        </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>How

                      much do you pay in site fees per week?</b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input type="radio" name="Site_Fee" value="Less than $100" class="fieldstyle">

                        Below $100 

                        <input type="radio" name="Site_Fee" value="More than $100" class="fieldstyle">

                      Above $100 

                        <input type="radio" name="Site_Fee" value="Over $150" class="fieldstyle">

                        Above $150</font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>What

                        is your timeframe for moving?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <select name="Moving_Time_Frame" id="Moving_Time_Frame" class="fieldstyle">

                          <option value="Within One Month">Within One Month</option>

                          <option value="1 - 2 Months">1 - 2 Months</option>

                          <option value="2 - 6 Months">2 - 6 Months</option>

 

                          <option value="Within One Year">Within One Year</option>

                          <option value="Not Sure">Not Sure</option>

                        </select>

 

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>How

                        many bedrooms do you have?</b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input type="radio" name="Rooms" value="1" class="fieldstyle">

                        1 

                        <input type="radio" name="Rooms" value="2" class="fieldstyle">

 

                        2 

                        <input type="radio" name="Rooms" value="3 or more" class="fieldstyle">

                        3 </font></div></td>

                  </tr>

 

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Do

                        you require covered parking?</b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input type="radio" name="Covered_Parking" value="Yes" class="fieldstyle">

                        Yes 

                        <input type="radio" name="Covered_Parking" value="No" class="fieldstyle">

                        No</font></div></td>

 

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>If

                        so, what type?</b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <select name="What_Type" id="What_Type" class="fieldstyle">

                          <option value="Select One">Select One</option>

                          <option value="1 Car">1 Car</option>

 

                          <option value="2 Car">2 Car</option>

                          <option value="Carport">Carport</option>

                          </select>

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Please

                      describe the features of your home and park?</b></font></div></td>

 

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <textarea name="Features" cols="40" rows="15" class="fieldstyle" id="Features"></textarea>

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>What

                        price are you selling for?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input name="Price_Selling" type="text" id="Price_Selling" value="" size="40" maxlength="" class="fieldstyle">

 

                        </font></div></td>

                  </tr>

                  <tr>

                    <td width="383" bgcolor="#EAEAFF"> <div align="left"><font color="#0000FF" size="2" face="Arial"><b>Has

                        the park management approved your sale?</b></font></div></td>

                    <td width="282" bgcolor="#FFFFFF"> <div align="left"><font color="#006666" size="2" face="Arial">

                        <input type="radio" name="Approved_For_Sale" value="Yes" class="fieldstyle">

                        Yes 

                        <input type="radio" name="Approved_For_Sale" value="No" class="fieldstyle">

 

                        No</font></div></td>

          &nbsp

Link to comment
Share on other sites

I took the form code and processing code and put it on my server. I made a few minor changes as far as a missing end div tag, and removed the maxlength="" parts because they were blank.

 

The whole thing works with the files and everything. I changed the to email so it sent to my address and I got 2 copies of it. It looks like the "auto-reply" needs to go to the email that was entered by the user, but I am not sure.

 

The images moved to the data folder and everything. So if this don't work on your server, then I am not sure what is going on. It worked in full on my side with images uploaded, mail sent and it redirected to the thank_you page.

 

So hopefully it works for you too... :)

 

Nate

 

theForm.html

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Untitled Page</title>
<meta name="generator" content="WYSIWYG Web Builder - http://www.wysiwygwebbuilder.com">
<style type="text/css">
div#container
{
   width: 800px;
   position: relative;
   margin-top: 0px;
   margin-left: auto;
   margin-right: auto;
   text-align: left;
}
body
{
   text-align: center;
   margin: 0;
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="container">
<div id="wb_Html1" style="position:absolute;left:60px;top:202px;width:687px;height:382px;z-index:0" align="left">
  <form name="form1" method="post" action="output.php" enctype="multipart/form-data">
    <table width="672" cellspacing="0" cellpadding="0">
      <tr>
      <td>
			<table width="672" border="0" cellspacing="1" bordercolor="#CCCCCC">
			 <tr bgcolor="#FFFFFF">
				<td colspan="2"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>  </b></font></div>
				  <div align="left"><font color="#006666" size="2" face="Arial"> </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>Full
					 Name </b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input name="Name" type="text" id="Name" value="" size="40"  class="fieldstyle">
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b> E-mail Address: *</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left">
					 <input name="email" type="text" id="email" size="40" maxlength="100" class="fieldstyle">
				  </div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>Home
					 Phone </b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input name="Home_Phone" type="text" id="Home_Phone" value="" size="40"  class="fieldstyle">
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>Mobile
					 Number</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input name="Mobile_Phone" type="text" id="Mobile_Phone" value="" size="40" class="fieldstyle">
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>Mailing
					 Address </b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input name="Mailing_Address" type="text" id="Mailing_Address" value="" size="40"  class="fieldstyle">
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>City </b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input name="City" type="text" id="City" value="" size="40"  class="fieldstyle">
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>State </b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input name="State" type="text" id="State" value="" size="40"  class="fieldstyle">
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>Post
					 Code </b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input name="Post_Code" type="text" id="Post_Code" value="" size="40"  class="fieldstyle">
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>How
					 much do you pay in site fees per week?</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input type="radio" name="Site_Fee" value="Less than $100" class="fieldstyle">
					 Below $100 
					 <input type="radio" name="Site_Fee" value="More than $100" class="fieldstyle">
					 Above $100 
					 <input type="radio" name="Site_Fee" value="Over $150" class="fieldstyle">
					 Above $150</font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>What
					 is your timeframe for moving?</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <select name="Moving_Time_Frame" id="Moving_Time_Frame" class="fieldstyle">
						<option value="Within One Month">Within One Month</option>
						<option value="1 - 2 Months">1 - 2 Months</option>
						<option value="2 - 6 Months">2 - 6 Months</option>
						<option value="Within One Year">Within One Year</option>
						<option value="Not Sure">Not Sure</option>
					 </select>
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>How
					 many bedrooms do you have?</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input type="radio" name="Rooms" value="1" class="fieldstyle">
					 1 
					 <input type="radio" name="Rooms" value="2" class="fieldstyle">
					 2 
					 <input type="radio" name="Rooms" value="3 or more" class="fieldstyle">
					 3 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>Do
					 you require covered parking?</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input type="radio" name="Covered_Parking" value="Yes" class="fieldstyle">
					 Yes 
					 <input type="radio" name="Covered_Parking" value="No" class="fieldstyle">
					 No</font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>If
					 so, what type?</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <select name="What_Type" id="What_Type" class="fieldstyle">
						<option value="Select One">Select One</option>
						<option value="1 Car">1 Car</option>
						<option value="2 Car">2 Car</option>
						<option value="Carport">Carport</option>
					 </select>
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>Please
					 describe the features of your home and park?</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <textarea name="Features" cols="40" rows="15" class="fieldstyle" id="Features"></textarea>
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>What
					 price are you selling for?</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input name="Price_Selling" type="text" id="Price_Selling" value="" size="40"  class="fieldstyle">
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>Has
					 the park management approved your sale?</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input type="radio" name="Approved_For_Sale" value="Yes" class="fieldstyle">
					 Yes 
					 <input type="radio" name="Approved_For_Sale" value="No" class="fieldstyle">
					 No</font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>Will
					 you assign your lease to new owner?</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <input type="radio" name="Assign_Lease" value="Yes" class="fieldstyle">
					 Yes 
					 <input type="radio" name="Assign_Lease" value="No" class="fieldstyle">
					 No</font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>Any
					 other comments regarding your home ?</b></font></div></td>
				<td width="282" bgcolor="#FFFFFF"><div align="left"><font color="#006666" size="2" face="Arial">
					 <textarea name="Comments" cols="40" rows="5" class="fieldstyle" id="Comments"></textarea>
					 </font></div></td>
			 </tr>
			 <tr>
				<td width="383" bgcolor="#EAEAFF"><div align="left"><font color="#0000FF" size="2" face="Arial"><b>Upload
					 images </b></font> <br>
					 <input type="file" name="picture1" >
					 <input type="file" name="picture2" >
					 <input type="file" name="picture3" >
					 <br>
					 <font size="1" face="Arial, Helvetica, sans-serif">Maximum File Size: 2megs</font></div></td>
			 </tr>
			 <td colspan="2" bgcolor="#FFFFFF"><div align="center"><br>
					 <input type="submit" name="Submit" value="Submit">
				  </div></td>
			 </tr>
		  </table>
	</td>
      </tr>
    </table>
  </form>
</div>
</div>
</body>
</html>

 

output.php

<?php

// Receiving variables
$Name = addslashes($_POST['Name']);
$email = addslashes($_POST['email']);
$Home_Phone = addslashes($_POST['Home_Phone']);
$Mobile_Phone = addslashes($_POST['Mobile_Phone']);
$Mailing_Address = addslashes($_POST['Mailing_Address']);
$City = addslashes($_POST['City']);
$State = addslashes($_POST['State']);
$Post_Code = addslashes($_POST['Post_Code']);
$Site_Fee = addslashes($_POST['Site_Fee']);
$Moving_Time_Frame = addslashes($_POST['Moving_Time_Frame']);
$Rooms = addslashes($_POST['Rooms']);
$Covered_Parking = addslashes($_POST['Covered_Parking']);
$What_Type = addslashes($_POST['What_Type']);
$Features = addslashes($_POST['Features']);
$Price_Selling = addslashes($_POST['Price_Selling']);
$Approved_For_Sale = addslashes($_POST['Approved_For_Sale']);
$Assign_Lease= addslashes($_POST['Assign_Lease']);
$Comments = addslashes($_POST['Comments']);

   if(isset($_FILES['picture1']['tmp_name']))
   {
        $tmp_name1 = $_FILES["picture1"]["tmp_name"];
          $name1 = $_FILES["picture1"]["name"];
       
        if(!move_uploaded_file($tmp_name1, "data/$name1"))
        {
              $error1 = 'Could not move file 1';
        }
   }
   
   if(isset($_FILES['picture2']['tmp_name']))
   {
      $tmp_name2 = $_FILES["picture2"]["tmp_name"];
      $name2 = $_FILES["picture2"]["name"];
       if(!move_uploaded_file($tmp_name2, "data/$name2"))
       {
         $error2 = 'Could not move file 2';
       }
   }

   if(isset($_FILES['picture2']['tmp_name']))
   {
      $tmp_name3 = $_FILES["picture3"]["tmp_name"];
      $name3 = $_FILES["picture3"]["name"];
       
      if(!move_uploaded_file($tmp_name3, "data/$name3"))
      {
         $error3 = 'Could not move file 3';
      }

}
// Validation
if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $email))
{
header("Location: error.html");
exit;
}

//Sending Email to form owner
# Email to Owner
$pfw_header = "From: $email";
$pfw_subject = "Real Estate Contact Form";
// Change to your email address.........
$pfw_email_to = "webmaster@arpra.org.au";
//......................................
$pfw_message = "Name: $Name\n"
. "email: $email\n"
. "Home_Phone: $Home_Phone\n"
. "Mobile_Phone: $Mobile_Phone\n"
. "Mailing_Address: $Mailing_Address\n"
. "City: $City\n"
. "State: $State\n"
. "Post_Code: $Post_Code\n"
. "Site_Fees: $Site_Fees\n"
. "Moving_Time_Frame: $Moving_Time_Frame\n"
. "Rooms: $Rooms\n"
. "Covered_Parking: $Covered_Parking\n"
. "What_Type: $What_Type\n"
. "Features: $Features\n"
. "Price_Selling: $Price_Selling\n"
. "Approved_For_Sale: $Approved_For_Sale\n"
. "Assign_Lease: $Assign_Lease\n"
. "Comments: $Comments\n"
. "\n";
mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

//Sending auto respond Email to user
# Email to Owner
// Change to your email address.........
$pfw_header = "From: webmaster@arpra.org.au";
//......................................
$pfw_subject = "Confirmation Auto - Response";
$pfw_message = "Name: $Name\n"
. "email: $email\n"
. "Home_Phone: $Home_Phone\n"
. "Mobile_Phone: $Mobile_Phone\n"
. "Mailing_Address: $Mailing_Address\n"
. "City: $City\n"
. "State: $State\n"
. "Post_Code: $Post_Code\n"
. "Site_Fees: $Site_Fees\n"
. "Moving_Time_Frame: $Moving_Time_Frame\n"
. "Rooms: $Rooms\n"
. "Covered_Parking: $Covered_Parking\n"
. "What_Type: $What_Type\n"
. "Features: $Features\n"
. "Price_Selling: $Price_Selling\n"
. "Approved_For_Sale: $Approved_For_Sale\n"
. "Assign_Lease: $Assign_Lease\n"
. "Comments: $Comments\n";

mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

header("Location: thank_you.html");


?>

Link to comment
Share on other sites

Hi Nate

 

 

So many thanks, i also got it to work this afternoon, i have been at work on a double shift. Thanks so much. One question? Is there a way of capturing the names of the images that someone send so it passes to the email form. Just in case several people uploaded at once there is no real way of telling who sent what?

 

 

And dont forget to send me ur email addy so i can send you some recipes of things you want. I really do appreciate your help.

Link to comment
Share on other sites

Yeah, the image names are already captured, you simply need to add the vars to the email.

 

If there is a chance that multiple upload images with the same name, you may want to designate that by adding their names to it as well...

 

The image names are captured with $name1, $name2 & $name3.

 

To add the uploaders name to the image, so you can really pinpoint who uploaded what you could do this....

 

if(isset($_FILES['picture1']['tmp_name']))
   {
        $tmp_name1 = $_FILES["picture1"]["tmp_name"];
          $name1 = str_replace(' ', '_', $Name.'_'.$_FILES["picture1"]["name"]);
       
        if(!move_uploaded_file($tmp_name1, "data/$name1"))
        {
              $error1 = 'Could not move file 1';
        }
   }
   
   if(isset($_FILES['picture2']['tmp_name']))
   {
      $tmp_name2 = $_FILES["picture2"]["tmp_name"];
      $name2 = str_replace(' ', '_', $Name.'_'.$_FILES["picture2"]["name"]);
       if(!move_uploaded_file($tmp_name2, "data/$name2"))
       {
         $error2 = 'Could not move file 2';
       }
   }

   if(isset($_FILES['picture2']['tmp_name']))
   {
      $tmp_name3 = $_FILES["picture3"]["tmp_name"];
      $name3 = str_replace(' ', '_', $Name.'_'.$_FILES["picture3"]["name"]);
       
      if(!move_uploaded_file($tmp_name3, "data/$name3"))
      {
         $error3 = 'Could not move file 3';
      }

}

 

I have concatenated (joined) the $Name variable with the image name variables and used a _ for the spaces. I have found that scripting and spaces in file names are sometimes not a good thing, I have run into too many problems, so I make it a habit when dealing with filenames to replace any spaces with _. That is what the str_replace(' ' , '_' ....... part is doing... it "translates" to replace this (' ' a space) with that ('_' underscore) in string (the filename).

 

If I filled out this form and entered my name as Bob Jones and uploaded images called my house.jpg, house2.jpg and house3.jpg it would tack my name onto the front of those and replace any spaces to make those filenames .....  Bob_Jones_my_house.jpg, Bob_Jones_house2.jpg, Bob_Jones_house3.jpg.

 

This would make it pretty difficult for images to get overwritten, not impossible by any means, but more difficult.

 

To add the names into the email you would do this....

 

change

 

. "Comments: $Comments\n"
. "\n";

 

to

. "Comments: $Comments\n"
. "Image 1: $name1\n"
. "Image 2: $name2\n"
. "Image 3: $name3\n"
. "\n";

 

Glad you got this working finally. This stuff can be tricky, especially when your just starting with it, or like in your case have a different profession and step into the programming ring for a couple rounds :)

 

Holler if you need any more help.

 

Nate

Link to comment
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.