...

View Full Version : Parse error: parse error, unexpected T_VARIABLE



tyfeatherston
01-20-2008, 06:02 AM
Contents info.php

<form method="post" action="sendmail.php">

<p><strong>Name: </strong>
<input name="name" type="text"/>
<br/><br />

<strong>Phone Number: </strong>
<input name="number" type="text" />
<br/><br />

<strong>E-mail:</strong>
<input name="email" type="text" />
<br/><br />

<strong>Comments: </strong>
<textarea name="message" cols="40" rows="10"></textarea>
<br /><br />

</p>
<input type="submit" name="Send" value="Send"/>

</form>

Contents sendmail.php

<?PHP

$to = "my@email.com";

$subject = "Info Request From Results From";

$name = $_REQUEST['name'];

$number = $_REQUEST['number'];

$email = $_REQUEST['email'];

$message = $_REQUEST['message'];



mail($to, $subject, $name $number $email $message, "From: $email");



header("Location: thankyou.php");

?>


I get an <?PHP

$to = "tyfeatherston@gmail.com";

$subject = "Info Request From Results From";

$name = $_REQUEST['name'];

$number = $_REQUEST['number'];

$email = $_REQUEST['email'];

$message = $_REQUEST['message'];



mail($to, $subject, $name $number $email $message, "From: $email");



header("Location: thankyou.php");

?>

Parse error: parse error, unexpected T_VARIABLE in /home/content/sendmail.php on line 28

Please help!!!

oesxyl
01-20-2008, 07:15 AM
Parse error: parse error, unexpected T_VARIABLE in /home/content/sendmail.php on line 28


Contents sendmail.php



<?PHP
$to = "my@email.com";
$subject = "Info Request From Results From";
$name = $_REQUEST['name'];
$number = $_REQUEST['number'];
$email = $_REQUEST['email'];
$message = $_REQUEST['message'];

mail($to, $subject, $name $number $email $message, "From: $email"); // line 28



- you miss "," after $name, $number, $email in mail(...) line


best regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum