我用了$_GET['IC_num'],不可以
不知道应该用什么了

解决方案 »

  1.   

    Header("Location:index.php?IC_num=$IC_num"); 或用session
      

  2.   

    Header("Location:index.php?IC_num=$row['IC_num']");
      

  3.   

    Header("Location:index.php?IC_num=$row['IC_num']");
    或者用SESSION session_start; $_SESSION['IC_NUM']=$row['IC_num']");读的时候  echo  $_SESSION['IC_NUM'];
    或者用COOKIE
    setcookie("IC_NUM",$row['IC_num']");)
      

  4.   

    <? 
    include "config.php";
    if(!isset($PHP_AUTH_USER)) 

    Header("WWW-Authenticate: Basic realm=请输入你的IC卡号和密码:"); 
    Header("HTTP/1.0 401 Unauthorized"); 
    echo "身份验证失败,您无权共享网络资源!"; 
    exit; 

    else {
    $PHP_AUTH_PW=md5($PHP_AUTH_PW);
    $query=mysql_query("SELECT * FROM IC where IC_value10='$PHP_AUTH_USER' and IC_passwd='$PHP_AUTH_PW'"); 
    if($row = mysql_fetch_row($query))
     {$IC_num=$row['IC_num'];
    Header("Location:index.phpIC_num=$IC_num");  }
    else

    Header("WWW-Authenticate:Basic realm==请输入你的IC卡号和密码:");  
    Header("HTTP/1.0 401 Unauthorized"); 
    echo "身份验证失败,您无权共享网络资源!";  
    exit();  
    } }
    ?> 这是我全部的程序,得不到$IC_num的值
      

  5.   

    首先Location:index.php?IC_num=$IC_num
                         ↑
                         你漏了?
    可能你没有通过验证,mysql_fetch_array()得不到值
      

  6.   

    那是我发帖的时候不小心掉的
    但我通过验证了,都可以登陆到index.php页上了啊