Is there an alternative command to HEADER for page redirection using PHP?
How can I use this alternative within buttons to go to a page when I onClick the button?
Thanks
coopster
7:19 pm on Jan 23, 2005 (gmt 0)
header() [php.net] is the function for redirection in PHP, why would you want or need an alternative? When you click an input button control is passed to the script found in the action attribute of the <form> element. Then in your PHP script you check for the submittal and redirect. For example,
if (isset($_POST['mySubmitButton'])) { header("Location: http://www.example.com/"); exit; }
If you want to do the same type of thing on the the client-side you will have to get creative with JavaScript.