Insert variable into Header Location PHP

后端 未结 7 890
北海茫月
北海茫月 2021-02-07 07:39

The question is: How do i insert the variable (echo $url_endpoint;) as a part of the link in the last line: header(\'Location: http://linkhere.com/HERE_I_WANT_THE_VARIABLE\');

相关标签:
7条回答
  • 2021-02-07 08:19

    There's nothing here explaining the use of multiple variables, so I'll chuck it in just incase someone needs it in the future.

    You need to concatenate multiple variables:

    header('Location: http://linkhere.com?var1='.$var1.'&var2='.$var2.'&var3'.$var3);
    
    0 讨论(0)
提交回复
热议问题