Forum Moderators: coopster

Message Too Old, No Replies

Parse error: syntax error, unexpected T VARIABLE in /home/a2919109/pub

         

coreyjansen

10:15 pm on Jul 20, 2011 (gmt 0)

10+ Year Member



Hey Guys,

I havent programmed in a few years but decided to program something small to help me at work and I have run into an issue. I'm basically making a form that submits to two email addresses.

Just wondering if u guys could help me out and help me figure whats giving me the error...


Heres my code

<?php
/* Set e-mail recipient */

$myemail = "cj@shaw.ca , $rep";

/* Customers info */
$rep = check_input($_POST['rep']);
$name = check_input($_POST['name']);

$address = check_input($_POST['addrees']);
$account = check_input($_POST['account']);
$contactnumber = check_input($_POST['contactnumber']);
$id1 = check_input($_POST['id1']);
$id2 = check_input($_POST['id2']);

$installdate = check_input($_POST['installdate']);
$othernotes = check_input($_POST['othernotes']);
/* SDP */
$port = check_input($_POST['port']);
$mtsbill = check_input($_POST['mtsbill']);
$port = check_input($_POST['port']);
$phonebook = check_input($_POST['phonebook']);
$listedas = check_input($_POST['listedas']);
$listednoaddress = check_input($_POST['listednoaddress']);
$alarm = check_input($_POST['alarm']);
$sdpnotes = check_input($_POST['sdpnotes']);

/* Television */
$television = check_input($_POST['television']);

/* Internet */
$internet = check_input($_POST['internet']);

$subject = "Shaw Workorder: $address"

/* Let's prepare the message for the e-mail */
$message = "Work Order

Reps Email: $rep


Customers Info:
Name: $name
Address: $address
Contact Number: $contactnumber
Account Number: $account

ID #1: $id1
ID #2: $id2


Digital Phone:
Port or New Number: $port

Name on Phone Bill: $mtsbill

Name in Phonebook: $phonebook

Listed as: $listedas
Listed Without Address? $listednoaddress

Alarm Company: $alarm

Digital Phone Notes: $sdpnotes

Television:
$television

Internet:
$internet




Requesting Instal Date of: $installdate


Other Notes: $othernotes
";

/* Send the message using mail() function */
mail($myemail, $subject, $message);

/* Redirect visitor to the thank you page */
header('Location: submitted.htm');
exit();

/* Functions we used */
function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
show_error($problem);
}
return $data;
}

function show_error($myError)
{
?>
<html>
<body>

<b>Please correct the following error:</b><br />
<?php echo $myError; ?>

</body>
</html>
<?php
exit();
}
?>

penders

11:22 pm on Jul 20, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi coreyjansen, welcome to WebmasterWorld and welcome back to programming and syntax errors!

The full error with line number would be helpful, but you are missing a semi-colon at the end of this line...

$subject = "Shaw Workorder: $address";