标题值php

标题值php,php,Php,您好,这行代码有问题 header('Location: student.php?student_id='<?php echo $get->student_id ?>; header('位置:student.php?student_id='; 它给出的错误是: 分析错误:语法错误,在第28行的C:\xampp\htdocs\Thesis\svalidate\u user.php中出现意外的“?” 感谢您的帮助。错误是由引起的。错误是由引起的,请勿在标题内使用echo

您好,这行代码有问题

    header('Location: student.php?student_id='<?php echo $get->student_id ?>;
header('位置:student.php?student_id=';
它给出的错误是:

分析错误:语法错误,在第28行的C:\xampp\htdocs\Thesis\svalidate\u user.php中出现意外的“?”


感谢您的帮助。

错误是由
引起的。错误是由
引起的,请勿在标题内使用echo

header('Location: student.php?student_id='.$get->student_id);
header('Location: student.php?student_id=' . $get->student_id);

不要在标题内使用echo

header('Location: student.php?student_id=' . $get->student_id);

您已经在PHP上下文中-这就是为什么
您已经在PHP上下文中-这就是为什么