Back to previous page with header( “Location: ” ); in PHP

前端 未结 6 2080
余生分开走
余生分开走 2020-11-28 02:46

The title of this question kind of explains my question. How do I redirect the PHP page visitor back to their previous page with the header( \"Location: URL of previou

6条回答
  •  清歌不尽
    2020-11-28 03:11

    Storing previous url in a session variable is bad, because the user might right click on multiple pages and then come back and save.

    unless you save the previous url in the session variable to a hidden field in the form and after save header( "Location: save URL of calling page" );

提交回复
热议问题