继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

Message Authentication Code 验证码

当年明月258
关注TA
已关注
手记 2
粉丝 3
获赞 12
<!--提交菜单-->
<?php
    if(isset($_REQUEST['authcode'])){
    session_start();
    if($_REQUEST['authcode']==$_SESSION['authcode']){
        echo "输入正确";    
    }
    else{
        echo "输入错误";
    }
    exit();
    }
?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8||GBK">
    <title>验证码的实现</title>
</head>
<body>
    <form name="form" action="./form.php"method='post'>
    <table>
    <tr>
        <td width="200" height="50"cellspacing="0" cellpadding="0"border="1">
            <td>验&nbsp;证&nbsp;码:&nbsp;&nbsp;&nbsp;<img border="1"src="./captcha.php? r=<?php echo rand();?>"width="160px" height="25px"></td>
        </td>
    </tr>
    <tr>
        <td width="200" height="50"cellspacing="0" cellpadding="0"border="1">
            <td>请输入图片的内容:<input name="text"type="text"value=""/></td>
        </td>
    </tr>   
    </tr>
        <td width="200" height="50"cellspacing="0" cellpadding="0"border="1">
        <td><input name="submit"type="submit"value="提交"style="padding:2px 24px;"></td>
    </td>
    </tr></table>
    </form>
</body>
</html>

<!--form菜单-->
<?php
    if(isset($_REQUEST['authcode'])){
    session_start();
    if($_REQUEST['authcode']==$_SESSION['authcode']){
        echo "输入正确";    
    }
    else{
        echo "输入错误";
    }
    exit();
    }
?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8||GBK">
    <title>验证码的实现</title>
</head>
<body>
    <form name="form" action="./form.php"method='post'>
    <table>
    <tr>
        <td width="200" height="50"cellspacing="0" cellpadding="0"border="1">
            <td>验&nbsp;证&nbsp;码:&nbsp;&nbsp;&nbsp;<img border="1"src="./captcha.php? r=<?php echo rand();?>"width="160px" height="25px"></td>
        </td>
    </tr>
    <tr>
        <td width="200" height="50"cellspacing="0" cellpadding="0"border="1">
            <td>请输入图片的内容:<input name="text"type="text"value=""/></td>
        </td>
    </tr>   
    </tr>
        <td width="200" height="50"cellspacing="0" cellpadding="0"border="1">
        <td><input name="submit"type="submit"value="提交"style="padding:2px 24px;"></td>
    </td>
    </tr></table>
    </form>
</body>
</html>
打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP