I am trying to get a test email page working. Here is a section from a form that I have:
Code:
<p> Comments or Questions: <br>
<input type="text" name="$comments" size="100" maxlength="250" >
</p>
I think the name of the field is comments. (I may well be wrong.) Is this the correct way to print out the text in that variable:
<?php
print( "variable comments contains < $comments >\n" );
?>
Part of the problem is I don't have a trigger to decide when to execute the php email statement. The HTML for the submit button looks like this:
Code:
<input type="submit" name="submit" value="Submit Now" >
I am expecting to write something like this, but I don't know how to get the variable:
Code:
<?php
if( $submit = true )
{
$email_status = mail( $to, $subject, $message );
}
?>
What do I need to change here?
If you want to see the page it is here:
http://www.bkelly.ws/test/phpmail.php
But obviously, it is subject to change
|