How to check or show the error on custom page if script do not work properly.
----------
<?php
if (isset($_REQUEST['email'])) {
$admin_email = "[email protected]";
$email = $_REQUEST['email'];
$subject = $_REQUEST['subject'];
mail($admin_email, "$subject", "From:" . $email);
echo "Message sent";
}
else {
?>
<form method="post">
Email: <input name="email" type="text" /><br />
Subject: <input name="subject" type="text" /><br />
Message:<br />
<input type="submit" value="Submit" />
</form>
<?php
}
?>
--------