PHP Redirect with POST data

后端 未结 13 1734
不思量自难忘°
不思量自难忘° 2020-11-22 06:22

I did some research on this topic, and there are some experts who have said that it is not possible, so I would like to ask for an alternative solution.

My situation

13条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-22 07:13

    Here there is another approach that works for me:

    if you need to redirect to another web page (user.php) and includes a PHP variable ($user[0]):

    header('Location:./user.php?u_id='.$user[0]);
    

    or

    header("Location:./user.php?u_id=$user[0]");
    

提交回复
热议问题