How to declare more than one header on PHP

后端 未结 9 2264
梦如初夏
梦如初夏 2020-12-11 02:55

I want to send my users to different pages based on user action. So I made multiple functions at the top of the page like so:



        
9条回答
  •  长情又很酷
    2020-12-11 03:04

    I have a nice solution:

    die(header("Location: someting.php");
    

    You can do that as often as you want. (Nothing else worked for me and to me this is a nice alternative)

    Especially for everyone who has a problem with using multiple options for "header" (on my site it would always just take one, no matter what I did)

提交回复
热议问题