我想尝试建立一个会话,但始终保持会话为空。使用此代码对本产品进行评分,此链接发送一封电子邮件打开的电子邮件,然后单击链接比代码工作会话为空的活动链接,请帮助我...<?php session_start(); include("myhomeportal/setting/config.php"); $conform = $_GET['conform']; $query = mysqli_query($conn, "SELECT * FROM item_users where com_code='$conform'"); $row = mysqli_fetch_array($query); if ($row) { // now update `com_code` $sql = "UPDATE item_users SET com_code='active', user_type='user' WHERE com_code='$conform'"; $result = mysqli_query($conn, $sql) or die(mysqli_error()); $inventory_id = $row['inventory_id']; $active = $row['com_code']; $_SESSION['sess_active'] = $active; header("Location: category.php?inventory_id=$inventory_id"); } else { // confirm code not found, show error } ?>
- 2 回答
- 0 关注
- 124 浏览
添加回答
举报
0/150
提交
取消