<SCRIPT>里面可以直接调用PHP变量吗??

解决方案 »

  1.   

    什么方法都行,只要能实现 验证失败提示重新输入,验证成功转到reg.php这个文件就可以
      

  2.   

    <form method="post" action="<?=$_SERVER['PHP_SELF']?>">
    如果你要把值提交到reg.php页,可以将上面的代码改为
    <form method="post" action="reg.php?act=1">
    在reg.php中用
    <?php
    if($_GET[act]=='1')
    {
    程序处理
    }
    ?>
      

  3.   

    <?php
    session_start();if (!empty($_SESSION['num']) and $_SESSION['num']==$_POST['number']) {
        $goto ="reg.php?username=".$_POST['username']."&password=".$_POST['password'];
        Header("location: $goto);
    } else {
        exit("失败");
    }
    ?>