PHP tags not working as they should
Posted: Wed Feb 15, 2006 3:50 pm
My Code is below. I have turnerd on php tags in config.php but this just displays the text between the first {php} tags. I'm assuming it's taking what's between the { characters and treating whats between tehm as a tag. How should I sort this? I tried to put the stuff in a user defined tag but kept saying "invalide code entered".
Contact form
Send the Bassmonsta a message
{php}if ($_SERVER['REQUEST_METHOD'] != 'POST'){$me = $_SERVER['PHP_SELF'];{/php}
Name:
Email:
Query/Question:
Enter your query here...
{php}
} else {
error_reporting(0);
$recipient = 'graham@namik.co.uk';
$name = stripslashes($_POST['name']);
$email = stripslashes($_POST['email']);
$msg = "Message from: $email\n\n".stripslashes($_POST['query']);
if (mail($recipient, 'MEssage from bassmonsta.co.uk', $msg))
echo nl2br("Message Sent:
To: $recipient
Subject: Email from bassmonsta.co.uk
Message:
$msg");
else
echo "Message failed to send";
}
{/php}
Contact form
Send the Bassmonsta a message
{php}if ($_SERVER['REQUEST_METHOD'] != 'POST'){$me = $_SERVER['PHP_SELF'];{/php}
Name:
Email:
Query/Question:
Enter your query here...
{php}
} else {
error_reporting(0);
$recipient = 'graham@namik.co.uk';
$name = stripslashes($_POST['name']);
$email = stripslashes($_POST['email']);
$msg = "Message from: $email\n\n".stripslashes($_POST['query']);
if (mail($recipient, 'MEssage from bassmonsta.co.uk', $msg))
echo nl2br("Message Sent:
To: $recipient
Subject: Email from bassmonsta.co.uk
Message:
$msg");
else
echo "Message failed to send";
}
{/php}