not sure where to post my question
-
I have a php parse error and im not sure which main topic area to post my question, can someone point me in the right direction?
hugs,
sharon
-
We can shuffle it around later. What’s the error?
Error:
Parse error: parse error, unexpected $ in /home/content/s/c/g/scgadbois/html/myLife/process.php on line 83Code:
/*
<?php
$to = “info@sharongadbois.com”;///replace with the email you want the form sent to
$subject = “Web Contact Data5”; //uses relative paths to the files they use
$firstName = $_POST[‘firstName’];
$lastName = $_POST[‘lastName’];
$email = $_POST[’email’];
$phone = $_POST[‘phone’];
$offline = $_POST[‘offline’]; //type of work client is requesting.
$web = $_POST[‘web’]; //type of work client is requesting.
$photography = $_POST[‘photography’]; //type of work client is requesting.
$design = $_POST[‘design’]; //type of work client is requesting.
$btc = $_POST[‘btc’]; //radio buttons – best time to contact
$message = $_POST[‘message’]; //text area, comment area$body = “First name: ” . $_POST[‘firstName’] . “\n” . “Lastname: ” . $_POST[‘lastName’] . “\n” . “Reply to: ” . $_POST[’email’] . “\n”. “Phone: ” . $_POST[‘phone’] . “\n”.”Offline: ” . $_POST[‘offline’] . “\n”. “Web: ” . $_POST[‘web’] . “\n”. “Photography: ” . $_POST[‘photography’]. “\n”. “Design: ” . $_POST[‘design’] . “\n”. “Best time to contact: ” . $_POST[‘btc’] . “\n”. “Message: ” . $_POST[‘message’] . “\n”.
$headers = “From: ” . $_POST[’email’] .”\n”;
$headers2 = “From: noreply@sharongadbois.com” .”\n”; //automatic reply from this ‘fake’ account
$subject2 = “Thank you for contacting me.”; // autmoatic message from ‘fake’ account noted above//automatic message that goes out to clients, so they know that their message was received by our database.
$autoreply = “Thank you for contacting me. I will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please wait until I contact you or consultant my website at http://www.sharongadbois.com for more information.”;if($firstName == ”) {print “You have not entered a first name, please go back and try again.”;}
else {
if($lastName == ”) {print “You have not entered a last name, please go back and try again.”;}
else {
if($email == ”) {print “You have not entered an email, please go back and try again.”;}
else {
if($phone == ”) {print “You have not entered a phone number, please go back and try again.”;}
else {
if($message == ”) {print “You have not entered a message, please go back and try again.”;}$send = mail($to, $subject, $body, $headers);
$send2 = mail($email, $subject2, $autoreply, $headers2);if($send) {
header(“Location:http://www.sharongadbois.com/myLife/process.php”);
} else {
print “We encountered an error sending your mail, please notify webmaster@sharongadbois.com.”;
}
}?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>*/
URL
http://sharongadbois.com/myLife/contact.php and the code written above is on the “process.php” pageAny thots?
Hi Sharon, that doesn’t look like a WordPress page, which is what we support here.
Your best bet may be to find a general purpose PHP forum for this one.
Sharon –
I’d like to also say that this form is pretty insecure. You have nothing that will prevent spamming attacks via form injection (which your webhost will HATE).
Get a better form. I have one for free on my website, actually (it’s been tested like crazy). Download and use it at will.
ok thanx.
im not sure which main topic area to post
If you are not using WP – then don’t post 🙂
- The topic ‘not sure where to post my question’ is closed to new replies.