Hi everyone,
I love this forum and I am new to PHP, I am currently using Mysql for my database and I am the form (provided here) in my PHP and everything is working fine.
My problem is...I keep getting this message below but everything seems to be working.
Notice: Undefined index: loging in C:\xampp\htdocs\training2\index.php on line 36
Notice: Undefined index: userlogin in C:\xampp\htdocs\training2\index.php on line 72
Notice: Undefined index: password in C:\xampp\htdocs\training2\index.php on line 72
wrong password or username, please try again
Maybe I need to remove something or...not sure. Any info will be very helpful.
On the login page you seemed to have logging spelt wrong, as well userlogin and password were not sent correctly to it.
Be sure to read the updated FAQ || Health is achieved through 10,000 different steps.
A textual description can be only part of your question, be sure to provide sample results, errors and your platform in the appropriate forums while asking.
Hello everyone,
I downloaded the files and also I already created a database.. but when i run it, i get this error message:
---------------------------------------------------------
Notice: Undefined index: logged in C:\wamp\www\OJT\test\index.php on line 10
Notice: Undefined index: userlogin in C:\wamp\www\OJT\test\index.php on line 51
Notice: Undefined index: password in C:\wamp\www\OJT\test\index.php on line 51
wrong pawssword or username, please try againplease enter your login information to proceed with our site
--------------------------------------------------------
it always appears when i run the index.php, i didnt change the codes.. ive just run..
what should i do to make it perfect..
So I downloaded your tutorial and I am trying to implement into a site I am building. However, when I register I am getting an error. Am I supposed to include:
CREATE TABLE `test`.`users` (
`id` INT NOT NULL auto_increment ,
`name` VARCHAR( 20 ) NOT NULL ,
`password` VARCHAR( 20 ) NOT NULL ,
`email` VARCHAR( 20 ) NOT NULL ,
PRIMARY KEY ( `id` )
)
And if so, where do I put this mySql code? Thanks.
This is the error I keep getting. Any thoughts?
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /home/lizette/public_html/Time4Moore.com/DEV/register.php on line 10
Access denied for user 'root'@'localhost' (using password: NO)
( ! ) Notice: Undefined index: logged in C:\wamp\www\index.php on line 10
( ! ) Notice: Use of undefined constant user - assumed 'user' in C:\wamp\www\index.php on line 25
( ! ) Notice: Use of undefined constant userlogin - assumed 'userlogin' in C:\wamp\www\index.php on line 25
( ! ) Notice: Use of undefined constant logged - assumed 'logged' in C:\wamp\www\index.php on line 26
The script works. however i keep getting these ugly orange boxes popping up whenever i login with the script. Before i login i get these errors
( ! ) Notice: Undefined index: logging in C:\wamp\www\index.php on line 10
( ! ) Notice: Undefined index: logging in C:\wamp\www\index.php on line 15
what can the problem be? Its all working? Its just annoying with those orange boxes in the way. i am using wampserver
Good day amrosama, i am new to php and i would like to ask you i tried to download the code and it displays unnecessary messages.. can you please help me with this problem? troubleshooting.doc
i am also using wampserver
This is a decent start but far from finished or good enough to be used in a live environment....
Why is the password sent in raw form?
Why are you using GET for authentication? This is against all web standards...
Proper PHP would be to useinstead ofCode:$_GET['userlogin']
(although $_GET is the wrong method to use as $_POST is the proper).Code:$_GET[userlogin]
Your MySQL is open to injection...
The session is vulnerable to session hijacking and fixation.
The database stores the raw password?!?!?! This is considered bad practice (although some would argue this) and the method used in this script is a textbook example of bad password practices. If you insist on storing the password in it;s raw form, you should not use it as an authentication but instead validate a hash of their password against another hash in the db.. never send raw passwords and never compare against a raw password in the db...
---------- Post added at 03:02 PM ---------- Previous post was at 02:59 PM ----------
The majority of the errors you are getting are becauseshould beCode:$_GET[userlogin]
(note the ' wrapping the key).Code:$_GET['userlogin']
Update all the array keys to use the ' and your errors will go away.
Also, the session check will throw an error too for first time users.
should also beCode:if($_SESSION["logged"])
Please note that this login script is not good to use on a live site unless you don't care about people gaining access to it or seeing you raw password.Code:if(isset($_SESSION["logged"]) && ($_SESSION["logged"] === true) )
"Life would be so much easier if we only had the source code."
There are currently 24 users browsing this thread. (0 members and 24 guests)
Bookmarks