I was using these code in index.php for send email
<?php
if (isset($_REQUEST['email'])) {
$admin_email = "md.alhussain365@gmail.com";
$email = $_REQUEST['email'];
$subject = "Website Visitor";
$message = $_REQUEST['message'];
mail($admin_email, "$subject", $message, "From:" . $email);
echo "Thank you for contacting us!";
else {
?>
form id="contact-form-face" class="clearfix" method="post">
<input type="email" name="email" value="Email" onFocus="if (this.value == 'Email') this.value = '';" onBlur="if (this.value == '') this.value = 'Email';" />
<textarea name="message" onFocus="if (this.value == 'Message') this.value = '';" onBlur="if (this.value == '') this.value = 'Message';">Message</textarea>
<input class="contact_btn" type="submit" value="Send message" />
</form>
<?php
}
?>
And everything works as I want. Like after sending a message stay page in same section (contact us).
But now my client doesn't want use index.php she wants to use index.html
That's why I separate the php code into other file. It works fine but it's going new page and showing one line text that I fixed. But I need to stay page like before.
So please tell me, How can I do same as did I before?