I do not know PHP.
I do not want the user to go to http://www.example.com/feedback-thanks.html after submitting the form. I want the text below the sent button or something without refreshing the page .
I deleted header( "Location: http://www.example.com/feedback-thanks.html" ); but I do not receive the email and the user is redirected to feedback.php ... :(
HTML
<form method="post" action="feedback.php"> <input name="email" type="email"/> <textarea name="message" id="feedback-textarea" autofocus="autofocus" required="required" ></textarea> <button type="submit" id="feedback-button-send">send</button> </form>
feedback.php
<?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; mail( " abcde@gmail.com ", "Subject Here", $message, "From: $email" ); header( "Location: http://www.example.com/feedback-thanks.html" ); ?>
Dominicanstan
source share