How to show php errors on my custom page ?
Posté : 08 juil. 2016, 15:26
I am a newbie in PHP field and developing a mail script but it is not working and not showing and error too.
How to check or show the error on custom page if script do not work properly.
----------
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
}
?>
--------