Case: I have a form in the page which enables users to add certain values in a simple text file. Now I want to redirect to the same page after values have been added successfully.
The read/write code all works great, I even put redirection code but this would display warning that
.
Headers I tried:
My Form code:
PROBLEM:
<ul>
<li>how can we do redirection in wordpress after form submission in our plugin?</li>
<li>
wonb't work, so don't suggest me this either</li>
</ul>
The read/write code all works great, I even put redirection code but this would display warning that
Code:
header information is already sent
Headers I tried:
Code:
header("Location: some_url_here_in_same_site");
wp_redirect("some_url_here_in_same_site");
My Form code:
Code:
if(isset($_POST['txtName'])}
// form validation code here
if(successful)
wp_redirect("some_url_here_in_same_site");
}
PROBLEM:
<ul>
<li>how can we do redirection in wordpress after form submission in our plugin?</li>
<li>
Code:
ob_start
</ul>