redirect - Monitoring for postbacks with PHP? -


I have a PHP page with content that my users can see when this page returns a POST , I want to redirect the user to another page.

My problems are:

How

thanks

For the second question, the header () will work if you click on any page Use this before outputting the information. However, if you print HTML or keep the HTML before it, then it will give an error.

Edit : In response to Todd's comment, you must do Haroon Haron suggested the page to save $ _POST data to a database or a file (make sure you Secure!), As you would with any $ _POST data, then you will have to use AJAX to get a response from a second PHP page, from where you saved the data from the existence of updated data Checks. If the feedback comes back true, then you redirect using a JavaScript redirect.

The only way to do this without using AJAX is to check that it will refresh the page using an HTML meta refresh element at intervals over time, $ _POST data has been received, the HTML will refresh , PHP will investigate, and you can either use it for redirects.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -