错误是出现在
$result = mysql_query($res,$con);
去掉就可以了,因为这里的$res不是一个string类型.
然后
$res=mysql_query("select * from cards where id={$_POST['cardno']}");//echo $result;
改成
$result = mysql_query("select * from cards where id={$_POST['cardno']}");//echo $result;
温馨提示:答案为网友推荐,仅供参考