Parsing Error [message #172753] |
Mon, 28 February 2011 00:34 |
mrc2323
Messages: 12 Registered: February 2011
Karma:
|
Junior Member |
|
|
In my attempts to modify an existing site I now own, I've tried to
implement ideas I've been getting here...and I have a new problem. In
the following code I get a "Parse error", and I can't determine why or
what to fix. The code below represents the minimum code that produces
the following error:
Parse error: syntax error, unexpected T_STRING, expecting ']'
in /home/content/94/6213994/html/contact.php on line 47
Please advise. TIA
//////////////////// Code for contact.php ///////////////////
<?php
include "include/page_top.php";
?>
<table border="0" style="width:455px">
<tr>
<td>
<div class="page_text">
<h1>Contact Us</h1>
</div>
</td>
</tr>
<tr>
<td class="page_text">
For information regarding event timing or production...etc.:
</td>
</tr>
<tr><td class="spacer"> </td></tr>
<tr>
<td align="center" >
<?php
//add form submition code
if(isset($_POST['submit_btn']))
{ // Protect against injection attacks
$contact = urldecode($_POST['email']);
if(eregi("\r",$contact) || eregi("\n",$contact) || eregi
("http://",$contact))
{
exit;
}
$to = "myid(at)gmail(dot)com";
$from = "$email\r\nBCC: results(at)raceplaceevents(dot)com";
$subject = "Race Place Events Website Inquiry";
$body1 = "Below is the info submitted:".
"\n\nName: {$_POST['name']}".
"\nEmail: {$_POST['email']}".
"\nName of Event: {$_POST['event_entered']}".
"\n\nComments: \n{$_POST['add_comments]}";
$eml_result = mail($to, $subject, $from, $body1);
if($eml_result)
{
do_msg("<br>Your info has been submitted.<br><br>");
}
else
{
do_msg("<br>There was a problem.<br>");
}
}
?>
</td>
</tr>
</table>
<?php
include "include/page_bottom.php";
?>
|
|
|