I got this error: "PHP Parse error: parse error, unexpected T_STRING on line 137" from the following code and I am not sure what is wrong iwth it. Any suggestions?

<html><head><title>RealProphet.com
</title>
</head>

<body>

<table border="0" cellpadding="5" cellspacing="0" width="100%">
  <tr>
    <td width="100%"><!--webbot bot="Include" U-Include="../include_head.htm"
      TAG="BODY" -->

    </td>
  </tr>
</table>
<table border="0" cellpadding="5" cellspacing="0" width="100%">
  <tr>
    <td width="170" valign="top"><!--webbot bot="Include"
      U-Include="../include_nav.htm" TAG="BODY" -->

      <p>&nbsp;</td>
    <td width="100%" valign="top">

    <font face="Arial,Helvetica,sans-serif" size="-1">
    <table cellSpacing="0" cellPadding="4" border="0">
      <tbody>
      </tbody>
    </table>

    </font>
    <div align="justify">
      <table border="0" cellpadding="0" cellspacing="0" width="580">
        <tr>
          <td width="578"><p><b><font face="Arial,Helvetica" size="+1" color="#840000">Please confirm your entry below so that we may correctly process your information to our Sales Agents and Investors.</font></b></p>

            <p>&nbsp;
            <div align="justify">
             <table border="0" cellpadding="0" cellspacing="0" width="492">
               <tr>
                 <td vAlign="top" align="left" width="95" bgColor="#FFFFFF" height="26" bordercolor="#FFFFFF">&nbsp;</td>
                 <td vAlign="top" align="left" width="547" bgColor="maroon" height="26"><img alt hspace="0" src="../images/corner-left.gif" align="left" border="0" width="6" height="5"><span style="float: left; color: #ffffff; padding-top: 2px; padding-bottom: 2px" class="P"><font face="Arial"><b>Confirmation
                   </b></font></span><img alt hspace="0" src="../images/corner-right.gif" align="right" border="0" width="6" height="5"></td>
               </tr>
               <tr>
                 <td vAlign="top" align="left" width="87" bgColor="#FFFFFF" height="128" bordercolor="#FFFFFF">&nbsp;
                 </td>
                 <td style="font-size: 8pt; border-left: 1px solid maroon; border-right: 1px solid maroon; border-bottom: 1px solid maroon; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding-bottom: 2px" vAlign="top" align="left" width="539" bgColor="#EFEFEF" height="128">

                   <p style="word-spacing: 0; margin: 0"><font color="#08285A" face="Arial,Helvetica" size="-1"><b>Submitted
                   Information:</b></font></p>
<h2>
<?php

include "clsMyClass.php";
$myclass = &New MyClass;

$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$fax = $_POST['fax'];
$cash = $_POST['cash'];
$duedate = $_POST['deudate'];
$forcdate = $_POST['forcdate'];
$assessedv = $_POST['assessedv'];
$compmin = $_POST['compmin'];
$compavg = $_POST['compavg'];
$negprice = $_POST['negprice'];
$street = $_POST['street'];
$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$comments = $_POST['comments'];

$myclass->Email = $email;
$myclass->Zip = $zip;

$check_email = $myclass->check_email();
$check_zip = $myclass->check_zip();

##Ensure all fields have entries
if($check_email and $check_zip)
{
    ##connect to mysql
    $conn = mysql_connect("mysqldb","xxxxxxx","yyyyyyy") or die("Err:Conn");

    ##select the database
    $rs=mysql_select_db("zzzzzzzzz", $conn) or die("Err:Db");

    ##create the query
    $sql="insert connect (fname, lname, email, phone, fax, cash, duedate, forcdate, assessedv, compmin, compavg, negprice, street, city, state, zip, comments) values( \"$fname\", \"$lname\", \"$email\", \"$phone\", \"$fax\", \"$cash\", \"$duedate\", \"$forcdate\", \"$assessedv\", \"$compmin\", \"$compavg\", \"$negprice\", \"$street\", \"$city\", \"$state\", \"$zip\", \"$comments\" )";

    ##execute the Query
    $rs=mysql_query($sql, $conn);

    ##confirm the added record details
    if($rs)
    {
        echo("</h2><p>Your First Name: ");
        echo($fname);
        echo("<br>Your Last Name: ");
        echo($lname);
        echo("<br>Your Email Address: ");
        echo($email);
        echo("<br>Your Phone Number: ");
        echo($phone);
        echo("<br>Your Fax Number: ");
        echo($fax);
        echo("<br>Amount Requested: ");
        echo($cash);
        echo("<br>Amount Needed By: ");
        echo($duedate);
        echo("<br>Date of Foreclosure: ");
        echo($forcdate);
        echo("<br>Property Assessed Value: ");
        echo($assessedv);
        echo("<br>Property Minimum Comp: ");
        echo($compmin);
        echo("<br>Property Average Comp: ");
        echo($compavg);
        echo("<br>Negotiated Purchase Price: ");
        echo($negprice);
        echo("<br>Property Street Name: ");
        echo($street);
        echo("<br>Property City: ");
        echo($city);
        echo("<br>Property State: ");
        echo($state);
        echo("<br>Property Zip Code: ");
        echo($zip);
        echo("<br>Additional Comments: ");
        echo($comments);
    };
}

else #if Email is Blank or Zip is the wrong length
{
    echo ("<p>Please press the "Back" button and enter a valid Email address and a five number Zip Code.");
}
?>
</h2>
                  <p style="word-spacing: 0; margin: 0"><font face="Arial,Helvetica" size="-1">
                   <br>
                   &nbsp; 
                 </td>
               </tr>
             </table>
           </div>
           <p>&nbsp;</td>
        </tr>
      </table>
    </div>


    </td>
  </tr>
</table>

</body>

</html>

I got this error: "PHP Parse error: parse error, unexpected T_STRING on line 137" from the following code and I am not sure what is wrong iwth it. Any suggestions?

Well... I tried to locate line 137, and what I got was this:

echo ("<p>Please press the "Back" button and enter a valid Email address and a five number Zip Code.");

And after a short reconsideration, I came up with this correction that should work:

echo ("<p>Please press the \"Back\" button and enter a valid Email address and a five number Zip Code.");

Hope that helps? :?:

Anytime you use quotes (") that you want the end user to see, always put backslashes before.

If you often forget, I have found you can use single quotes and not have to use backslashes...example...

Instead of this...

<?php echo "Press the \"Back\" button"; ?>

You could probably use

<?php echo 'Press the "Back" button'; ?>

Perhaps Troy knows a bit more about this...

Thanks guys. I guess sometimes a fresh set of eyes are induplicable! That was the issue :o . Have a great week!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.