我正在使用会话将表单数据传递到下一页但我一直在收到错误。以下是我得到的错误。
警告:session_start():无法发送会话cookie - 已在C:\ xampp \ htdocs \ KBSS_performanceAppraisalSystem \ individual_review2.php中发送的报头(输出从C:\ xampp \ htdocs \ KBSS_performanceAppraisalSystem \ individual_review2.php:202开始)在第205行
警告:session_start():无法发送会话缓存限制器 - 已在C:\ xampp \ htdocs \ KBSS_performanceAppraisalSystem \ individual_review2.php中发送的报头(输出从C:\ xampp \ htdocs \ KBSS_performanceAppraisalSystem \ individual_review2.php:202开始)在第205行
致命错误:在
中调用未定义的函数session_register()
这是我的代码:
<php
session_start();
session_register('f_name');
session_register('s_name');
session_register('employee_id_number');
session_register('department');
session_register('supervisors_name');
session_register('position');
session_register('review_date');
session_register('duties');
session_register('kpi');
//finally, let's store our posted values in the session variables
$_SESSION['f_name'] = $_POST['f_name'];
$_SESSION['s_name'] = $_POST['s_name'];
$_SESSION['employee_id_number'] = $_POST['employee_id_number'];
$_SESSION['department'] = $_POST['department'];
$_SESSION['supervisors_name'] = $_POST['supervisors_name'];
$_SESSION['position'] = $_POST['position'];
$_SESSION['review_date'] = $_POST['review_date'];
$_SESSION['duties'] = $_POST['duties'];
$_SESSION['kpi'] = $_POST['kpi'];
?>
答案 0 :(得分:1)
<?php
session_register()
,因为它已被删除。 $_SESSION['f_name'] = $_POST['f_name'];
答案 1 :(得分:0)
不是<?php
而不是<php
,如果这是一个拼写错误,那么在<?php
标记删除它之前必须有一个空格,它应该有效。