通过标题位置时为空参数

时间:2017-12-13 18:38:36

标签: php

我根据数组设置变量。当我回显它显示在屏幕上的变量时,但当我尝试将其添加到标题位置时,它不会显示在下一页的URL中 - 其他一切都会:

$myid = $selected_cat3[0]['id'];

Header("Location:/cat-dashboard/cat-results/?catID=" . $myid
     . "&question1=" . $_GET['question1'] . "&question2=" . $_GET['question2']
     . "&question3=" . $_GET['question3'] . "&question4=" . $_GET['question4']
     . "&question5=" . $_GET['question5'] . "&question6=" . $_GET['question6']
     . "&question7=" . $_GET['question7'] . "&question8=" . $_GET['question8']);

这是生成的网址:

/cat-dashboard/cat-results/?catID=&question1=0&question2=3&q‌​uestion3=1&question4‌​=1&question5=1&quest‌​ion6=2&question7=1&q‌​uestion8=3

我做错了吗?即使我使用$myid = "1";

,它也无法显示

0 个答案:

没有答案