checkfirm.php:session_start();
$_SESSION['ProdIdx']=$ProdIdx;
header('location: styel1.php');
styel1.php:session_start();
echo $_SESSION['ProdIdx'];

解决方案 »

  1.   

    header("Location:style.php?ProdIdx =$ProdIdx ");
      

  2.   

    有错误: checkfirm.php
       if ($numrows_buy!=0) //判断该序列号是不是被使用过!
          {
      echo "该序列号已被使用过";
      }
       else
         {
    //   echo "数据验证通过"; 
      session_start();
                        $_SESSION['ProdIdx']=$ProdIdx;
          header("Location:style.php"); //网页跳转;
     }  style1.php      <tr>
            <td>
              <div align="left">                
             <?php
     session_start();
             echo $_SESSION['ProdIdx'];
             ?>
              </div></td>
          </tr>
    错误内容Warning: session_start(): Cannot send session cookie - headers already sent by (output started at D:\my work\stempsite\gb2312\style1.php:6) in D:\my work\stempsite\gb2312\style1.php on line 101Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at D:\my work\stempsite\gb2312\style1.php:6) in D:\my work\stempsite\gb2312\style1.php on line 101
    222222222222  
     
      

  3.   

    session_start()前面不能有任何输出,请检查是否有echo 或空格之类的
      

  4.   

    你之前已经session_start();了,重复了
      

  5.   

    为什么现在回读不到数据,帮忙看看,谢谢!
    checkfirm.php
       if ($numrows_buy!=0) //判断该序列号是不是被使用过!
          {
      echo "该序列号已被使用过";
      }
       else
         {
    //   echo "数据验证通过"; 
      session_start();
                        $_SESSION['ProdIdx']=$ProdIdx;
          header("Location:style.php"); //网页跳转;
     }  style1.php      <tr>
            <td>
              <div align="left">                
             <?php

             echo $_SESSION['ProdIdx'];
             ?>
              </div></td>
          </tr>改成这样后,读不到数据,这是为什么?
      

  6.   

    <?php
    session_start();
             echo $_SESSION['ProdIdx'];
             ?>
      

  7.   

    但是改成
    <?php
    session_start();
             echo $_SESSION['ProdIdx'];
    ?>
    后会抱错的阿,
    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at D:\my work\stempsite\gb2312\style1.php:6) in D:\my work\stempsite\gb2312\style1.php on line 101Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at D:\my work\stempsite\gb2312\style1.php:6) in D:\my work\stempsite\gb2312\style1.php on line 101
    222222222222  
      

  8.   

    <?php session_start(); ?>
           <tr>
            <td>
              <div align="left">                
             <?php

             echo $_SESSION['ProdIdx'];
             ?>
              </div></td>
          </tr>