Hey all,
I have created a mail script in PHP for a contact form on my website. I have a message that displays when the message has been sent. I would like this message to display below my form but am having some trouble with this. The message is currently being displayed at the very top of my page. Here is what I have;
<?php
//mail form code here
$variable = 'some text';
?>
<html>
<head>
<body>
blah
blah
blah
<?php echo $variable; ?>
blah
blah
blah
This gives me an error saying that the variable does not exist. I am guessing that this has something to do with th scope of the variable but was wondering how I could do what I am trying. Thanks