登录表单(USERID,密码)收到错误 [英] Login Form (USERid, Password) getting error

查看:202
本文介绍了登录表单(USERID,密码)收到错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi guyz!

请帮我解决错误,因为我无法找到它...
我的要求是否会有用户名字段和密码字段和登录单击按钮后按钮某些验证必须完成,无论他是否是有效用户(连接到数据库并检查有效用户和密码)如果他是有效用户,他必须登录并转到另一个php文件..... />

即时通讯使用winxp OS / XAMPP Windows版本1.6.4!

问题:我发送错误即时发送错误& code plz sort out

展开 | 选择 | Wrap | 行号

解决方案

嗨Priya,

我认为问题出在php的第一行。意味着你之前开始会话()。做一个想法,只是在你分配


SESSION [''username''] =

之前,从开始和粘贴到其他部分切断会话start()的protion

用户名;好吧,我认为它会奏效。

[PHP]<?php

// session_start();从这里删除这一行


//连接到数据库

mysql_connect(" localhost"," root"," sunkalpid" )或死(无法连接:。mysql_error());

mysql_select_db(" emp)或死(mysql_error());



hi guyz!
please help me in sorting out error as im unable to find it...
my requirement is there will be userid field and password field and "login" button after clicking button certain validations must be done whether he is an valid user or not (connect to database and check for valid user & password) if he is valid user he must login and goto another php file.....

im using winxp OS / XAMPP Windows Version 1.6.4 !

Problem: im getting errors im sending the errors & code plz sort out

Expand|Select|Wrap|Line Numbers

解决方案

Hi Priya,
I think the problem is in the first line of php. means u start the session() before. do one think, just cut that protion of session start() from the begining and paste to else part just before u assign the


SESSION[''username''] =


username; ok i think it will work.
[PHP]<?php
//session_start(); remove this line from here

//Connect to database

mysql_connect ( "localhost", "root", "sunkalpid")or die("Could not connect: ".mysql_error());
mysql_select_db("emp") or die(mysql_error());



这篇关于登录表单(USERID,密码)收到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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