Here is my code, whenever i am testing if its false (I dont type in the from box it says message sent anyway?
I am using method="post" on other webpage
Code:
<?php
if (isset($_REQUEST['from']))
{
$from = $_REQUEST['from'];
$to = $_REQUEST['to'];
$subject = $_REQUEST['subject'];
$message = $_REQUEST['message'];
mail("$to", "$subject", $message, "From:".$from);
echo "<div align='center'>Message sent!</div>";
}
else
//Else show form again
{
echo "<form action='cheaposend.php' method='post'>
From:<input type='text' name='from'/><br />
To:<input type='text' name='to'/><br />
Subject:<input type='text' name='subject'/><br />
Message:<input colspan='60' height='30px' type='text' name='message'/><br/>
<input type='submit'/>
</form>";
}
?>
Comment