When submitting a form in PHP, if the requirements are not met, it will return to the previous page, but unlike ASP, the previously entered content will be retained, resulting in having to re-enter everything. I always thought that this might be the case with PHP. So I was lazy for a while and didn’t search for it. Today I saw a solution. It worked really well after I tried it. Haha, it seems I need to read more! The code is as follows:
session_cache_limiter('private, must-revalidate');
should be written at the top of the form page and added before session_start();. If session_start() is placed in conn, it is best to use this code Don't put them in the conn together, because when you return to other pages, they will not be refreshed.
Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.
The above introduces the problem of returning to the previous page in PHP, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.