Forum Moderators: coopster

Message Too Old, No Replies

parse error, unexpected T_VARIABLE

parse error, unexpected T_VARIABLE

         

jbeck

11:09 pm on Jan 13, 2006 (gmt 0)

10+ Year Member



Hi all,

I'm trying to get my first PHP "Contact Us" form to work. I am getting the following message: "parse error, unexpected T_VARIABLE" on line 14 of my contact.php code. I'll attach the code below. If anyone can help, it's greatly appreciated! By the way, line 14 starts with $Name
---------------
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
<span class="style1">Thanks for submitting your information. Someone will get back to you shortly!
</span>
<?php

// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "me@me.com";
$Subject = "Website Contact"
$Name = Trim(stripslashes($_POST['Name']));

[edited by: coopster at 11:48 pm (utc) on Jan. 13, 2006]
[edit reason] removed unnecessary code [/edit]

coopster

11:47 pm on Jan 13, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, jbeck.

That is typically a line syntax error, and in this case it is because you forgot to terminate the line before that with a semicolon ;)

jbeck

11:50 pm on Jan 13, 2006 (gmt 0)

10+ Year Member



Excellent! Thank you for your help!