首页 > php代码 > 会员卡积分查询代码

会员卡积分查询代码

会员卡积分查询代码,本人今天人公司写一个简单的会员查询的系统现在把一部份拿出来了.

<span id="jfcxtitle"></span>
<form action="" method="post" enctype="multipart/form-data" >
<label for="point">输入您的卡号:</label>
<input name="point" type="text" id="point" value="请输入您的卡号"  onClick="this.value='';">
<input language="javascript" onclick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); " name="submit" id="" type="submit" tabIndex="3" value="确定查询" />
</form><font color=red>
<?php
if ($_POST) {
    $value = addslashes(isset($_POST['point']) ? $_POST['point'] : '');
    if (empty($value) || !is_numeric($value)) {
        echo '请入的卡号有误!';
    } else {
        $sql = "select * from gx_integral where inte_card='$value' ";
        $result = mysql_query($sql) or die('Database error! plase call us');
        if (!mysql_num_rows($result)) {
            echo '对不起,你输入的卡号不存在,请检查是否正确';
        } else {
            $rs = mysql_fetch_object($result);
            echo '你的目前的积分为:', $rs['inte_integral'];
            mysql_free_result($rs);
        }
    }
}
?>
</font>
</div>

效果图片,

本文地址:http://www.phprm.com/code/faaf32ada90526864e034682a3da08f4.html

转载随意,但请附上文章地址:-)

标签:none

发表留言