Join Login


99Designs.com
 Web Form Code Not Working
 by Bassman1956 - Aug 08, 2012

Hi, I saw your YouTube video:

http://www.youtube.com/watch?feature=endscreen&v=z2cVERxjSRY&NR=1

on creating a web form in Dreamweaver using PHP.

I went through all the steps and applied what I learned to the current form I'm trying to change. I am getting this message:

Parse error: syntax error, unexpected $end in /home/content/97/4527297/html/erga/ergaform.php on line 288

The URL is ergacollect.com/ergaform.php

Thanks for your help!!

Here is the html code:

<?php
if ($_POST['parse_var'] == "ergaform"){
$emailTitle = 'ERGA Web Response Form';
$yourEmail = 'oir@cfl.rr.com';

$dateField = $_POST['date'];
$debtor_noField = $_POST['debtor_no'];
$debtor_nameField = $_POST['debtor_name'];
$debtor_firmField = $_POST['debtor_firm'];
$debtor_address1Field = $_POST['debtor_address1'];
$debtor_address2Field = $_POST['debtor_address2'];
$debtor_address3Field = $_POST['debtor_address3'];
$debtor_phoneField = $_POST['debtor_phone'];
$debtor_faxField = $_POST['debtor_fax'];
$client_noField = $_POST['client_no'];
$client_nameField = $_POST['client_name'];
$client_firmField = $_POST['client_firm'];
$client_address1Field = $_POST['client_address1'];
$client_address2Field = $_POST['client_address2'];
$client_address3Field = $_POST['client_address3'];
$client_emailField = $_POST['client_email'];
$client_phoneField = $_POST['client_phone'];
$client_faxField = $_POST['client_fax'];

$body = <<<EOD
<br><hr><br>

Date: $dateField <br />
Debtor No.: $debtor_noField <br />
Debtor Name: $debtor_nameField <br />
Debtor Firm: $debtor_firmField <br />
Debtor Address1: $debtor_address1Field <br />
Debtor Address2: $debtor_address2Field <br />
Debtor City, State, Zip: $debtor_address3Field <br />
Debtor Telephone: $debtor_phoneField <br />
Debtor Fax: $debtor_faxField <br />

Client No.: $client_noField <br />
Client Name: $client_nameField <br />
Client Firm: $client_firmField <br />
Client Address1: $client_address1Field <br />
Client Address2: $client_address2Field <br />
Client City, State, Zip: $client_address3Field <br />
Client Email: $client_emailField <br />
Client Telephone: $client_phoneField <br />
Client Fax: $client_faxField <br />

EOD;

$headers = "From: $client_emailField\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail("$yourEmail","$emailTitle", "$body", "$headers");

$sent = "Thank you! Your message has been sent.";
}
?>

<html>
<head>
<title>Submit Your Collection Matter</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body bgcolor="#FFFFFF" background="graphics/background.gif">
<table width="101%" border="0">
<tr>
<td valign="top" width="24%">
<p align="center"><font size="5"><img src="graphics/ERGALogo.gif" width="148" height="160" /><br />
</font> <font size="1">P.O. Box 610808 &#149; Dallas, TX 75261<br />
Telephone: 972-874-8984 or 972-345-9871<br />
Fax: 972-986-5029<br />
E-mail:<b><font face="Arial, Helvetica, sans-serif"><a href="mailto:ergassoc@aol.com">ergassoc@aol.com</a></font></b>
<br />
<br />
<br />
<a href="index.htm"><img src="graphics/Home.gif" width="82" height="58" border="0" alt="ERGA Home Page" /></a><br />
</font><b>Home</b></font></p>
<p align="center"><font size="2"><b><font face="Arial, Helvetica, sans-serif"><a href="overview.htm"><img src="graphics/Handshake.gif" width="74" height="64" border="0" alt="Why Hire Us?" /></a><br />
Why Hire Us?<br />
<br />
<a href="rates.htm"><img src="graphics/Dollar_Sign.gif" width="107" height="62" border="0" /></a><br />
Why You Need<br />
a Professional<br />
Collection Firm<br />
<br />
<a href="rates.htm"><img src="graphics/Overview.gif" width="68" height="66" border="0" alt="Commission Schedule" /></a><br />
<br />
</font></b><font face="Arial, Helvetica, sans-serif"><b>Commission Schedule</b></font><b><font face="Arial, Helvetica, sans-serif"><br />
<br />
<a href="graph.htm"><img src="graphics/Presenter.gif" width="68" height="63" border="0" alt="Why Recovery Delay is Costly" /></a><br />
Why Recovery<br />
Delay is Costly </font></b></font></p>
<p align="center">&nbsp;</p>
</td>
<td width="76%">
<p align="center"><font face="Arial, Helvetica, sans-serif" size="4"><b><font size="5">Claim
Form</font></b></font></p>

<form id="ergaform" name="ergaform" method="post" action="ergaform.php">

<table width="97%" border="0" cellpadding="4" height="294">
<tr>
<td valign="top" height="314" width="81%">
<div align="center">
<p align="left"><b>
</b></font></p>
<table width = "89%" border = "0">
<tr>
<td width="22%" height="34"><b><font size="4"></font></b></font></td>
<td width="29%" height="34"><b>Date
</b></font></td>
<td width="49%" height="34"><b>
<input type="text" name="date" value="<?php print "$dateField"; ?>" />
</b></font></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%">&nbsp;</td>
<td width="49%">&nbsp;</td>
</tr>
<tr>
<td width="22%"><b><b><font size="4"><u>Debtor</u></font></b></font><font size="4"></font></b></font></td>
<td width="29%"><b>Customer
No.</b></font></td>
<td width="49%"><b>
<input name = "debtor_no" size = "40" maxlength="40" id="debtor_no" value="<?php print "$debtor_noField"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%"><b></b></font></td>
<td width="29%"><b>Contact
Name</b></font></td>
<td width="49%"> <b>
<input name = "debtor_name" size = "40" maxlength="40" value="<?php print "$debtor_nameField"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%">
<p><b>Firm</b></font></p>
</td>
<td width="49%"> <b>
<input name = "debtor_firm" size = "40" maxlength="40" value="<?php print "$debtor_firmField"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%"><b>Address</b></font></td>
<td width="49%"> <b>
<input name = "debtor_address1" size = "40" value="<?php print "$debtor_address1Field"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%">&nbsp;</font></td>
<td width="49%"> <b>
<input name = "debtor_address2" size = "40" maxlength="40" value="<?php print "$debtor_address2Field"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%"><b>City,
State Zip</b></font></td>
<td width="49%"> <b>
<input name = "debtor_address3" size = "40" maxlength="40" value="<?php print "$debtor_address3Field"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%"><b>Telephone</b></font></td>
<td width="49%"> <b>
<input name = "debtor_phone" size = "40" maxlength="40" value="<?php print "$debtor_phoneField"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%" height="31">&nbsp;</td>
<td width="29%" height="31"><b>Fax</b></font></td>
<td width="49%" height="31"><b>
<input name = "debtor_fax" size = "40" maxlength="40" value="<?php print "$debtor_faxField"; ?>" />
</b></td>
</tr>
</table>
<br />
<br />
<b><font size="4">
</font> </b> </font>
<table width = "89%" border = "0">
<tr>
<td width="22%"><b><font size="4"><u>Client</u></font></b></font></td>
<td width="29%"><b>Customer
No. </b></font></td>
<td width="49%"> <b>
<input name = "client_no" size = "40" maxlength="40" value="<?php print "$client_noField"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%"><b>Contact
Name</b></font></td>
<td width="49%"> <b>
<input name = "client_name" size = "40" maxlength="40" value="<?php print "$client_nameField"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%">
<p><b>Firm</b></font></p>
</td>
<td width="49%"> <b>
<input name = "client_firm" size = "40" maxlength="40" value="<?php print "$client_firmField"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%"><b>Address</b></font></td>
<td width="49%"> <b>
<input name = "client_address1" size = "40" value="<?php print "$client_address1Field"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%">&nbsp;</font></td>
<td width="49%"> <b>
<input name = "client_address2" size = "40" maxlength="40" value="<?php print "$client_address2Field"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%"><b>City,
State Zip</b></font></td>
<td width="49%"> <b>
<input name = "client_address3" size = "40" maxlength="40" value="<?php print "$client_address3Field"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%"><b>E-mail</b></font></td>
<td width="49%"><b>
<input name = "client_email" size = "40" maxlength="40" value="<?php print "$client_emailField"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%"><b>Telephone</b></font></td>
<td width="49%"> <b>
<input name = "client_phone" size = "40" maxlength="40" value="<?php print "$client_phoneField"; ?>" />
</b></td>
</tr>
<tr>
<td width="22%">&nbsp;</td>
<td width="29%"><b>Fax</b></font></td>
<td width="49%"><b>
<input name = "client_fax" size = "40" maxlength="40" value="<?php print "$client_faxField"; ?>" />
</b></td>
</tr>
</table>
<p>We assign this account to Elliott, Riddle, Graham &amp; Associates<br />
and have authorized them to proceed to collect the balance due.</font></p>
<p>Amount of Claim: <b>$
<input type="text" name="amount" />
</b>
<input type="checkbox" name="imm_action" value="Yes" />
Immediate Action
<input type="checkbox" name="free_demand" value="Yes" />
Free Demand</font></p>
<p align="center"><b>Please
provide additional information or comments below.<br>
<br />
</font></b> <b>
<textarea name="add_info" cols="50" wrap="PHYSICAL" rows="12"></textarea>
</font></b></p>
<p align="center">
<input type="submit" name="Submit" value="Submit" />
<input type="reset" name="Reset" value="Reset" />
<input type="hidden" name="parse_var" id="parse_var" value="ergaform" />
</p>

<tr><?php print "$sent"; ?></tr>
</div></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>









Bassman1956
United States
Posts:1
Joined:Aug 08, 2012
 RE: Web Form Code Not Working
 by KingDigital - Aug 15, 2012

Make sure you have your EOD correctly coded. Remember he said in the video that is one of the main errors you can have with it.


I am nerd and I know it
KingDigital
United States of America
Posts:24
Joined:Jun 28, 2012
  
Home About Contact Forum Youtube Privacy Policy
Copyright © 2009-2011 RiverCityGraphix.All Rights Reserved.