简单的Php登录脚本问题 - Mysql错误 [英] Issue With Simple Php Login Script - Mysql Error

查看:64
本文介绍了简单的Php登录脚本问题 - Mysql错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我一直在玩一个简单的php登录脚本,当我尝试使用我在sql中设置的用户名和密码登录时,我收到错误消息表。错误消息如下:


警告:mysql_num_rows():提供的参数不是28行/home/greenpos/public_html/test4/checklogin.php中的有效MySQL结果资源

错误的用户名或密码


代码:

展开 | 选择 | 换行 | 行号

解决方案

您使用的是PHP 4.1.0或更高版本吗?


使用session_register()已弃用


这是首选方式....

展开 | 选择 | 换行 | 行号


嗨非常感谢你的回复。


i已经完成了你的要求。


下面是代码:

展开 | 选择 | Wrap | 行号


您可以试试这段代码:

展开 | 选择 | Wrap | 行号< /跨度>

Hi,

I have been playing around with a simple php login script and im getting an error message when i attempt to log in with the username and password i set in the sql table. The error message is as follows:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/greenpos/public_html/test4/checklogin.php on line 28
Wrong Username or Password

The code:

Expand|Select|Wrap|Line Numbers

解决方案

Are you using PHP 4.1.0 or higher?

The use of session_register() is depreciated

This is the preferred way....

Expand|Select|Wrap|Line Numbers


Hi thanks soooo much for the reply.

i have done what you asked.

below is the code:

Expand|Select|Wrap|Line Numbers


Can you try this code:

Expand|Select|Wrap|Line Numbers


这篇关于简单的Php登录脚本问题 - Mysql错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆