Parse error: syntax error, unexpected T_STRING in /home/pbgwell/public_html/process-form_CC.php on line 16
Hi all! First post so take it easy on me if i make a mistake. I have done many post forms before, and basically I do it "fool proof" way, save the last one as the new one and edit the data. I am not the PHP expert but I am not totally clueless either, and this has worked until now. I have checked for semicolons and quotes, but the thing is, I dont even have to bec I have tested between two different version on a different domain, and the same part of the error code works in one and doesnt in another. I have also checked my web page form code and thats fine too. Here is the code... (not final version but I deleted a lot of stuff to streamline for testing).. I have use that
$headers = "From: $email";
line in all my sites and this is the first time it comes up with an error. I must be missing something else, help!
<?php
// Pick up the form data and assign it to variables
$firstname = $POST['firstname'];
$lastname = $POST['lastname'];
$email = $_POST['email'];
// Build the email (replace the address in the $to section with your own)
$to = 'jd@ds.com';
$subject = "PBG.com Service Request from $first $last";
$body = "New Contact Form Information
First Name: $firstname
Last Name: $lastname
Email: $email
$headers = "From: $email";
// Send the mail using PHPs mail() function
mail($to, $subject, $body, $headers);
// Redirect
header("Location: form_ty.htm");