Comment by gukkie87 on February 14, 2010 at 9:04 am
elvisniperx, after the if statement, instead of using echo, change it to, header(“Location:memberpage.php”);
Comment by wahahe123 on February 14, 2010 at 9:09 am
nice tutorial my good man. well it works perfectly for me the only problem now is how can i put designs on this code? when i’m writting an html code the echo and die doesn’t work anymore. does this tutorial have to be set at a blank page only? ;<
Comment by elvisniperx on February 14, 2010 at 9:09 am
what if i want to proceed directly to the member page after i clicked the LOGIN? what code would i do?
Comment by paulmariz on February 14, 2010 at 10:00 am
please help me when i used the $_session['username']; it always shows an error. the error is like this: undefined index: username. PLS..HOW CAN I FIX THIS?..
Comment by NiallTL on February 14, 2010 at 10:46 am
Just a security note: People can manually change their cookies, so storing just a username and checking that isn’t safe. Store the password hash as well and check it against the DB entry.
Comment by davey1988k on February 14, 2010 at 11:00 am
Thanks dude, you have been very helpful
Works perfectly for me
Comment by DubThisAFoundation on February 14, 2010 at 11:38 am
Anyone know why i get this error msg “incorrect password!” although the script, user name and password are all correct?
Any Help?
Comment by lukie254 on February 14, 2010 at 11:41 am
@TheFoit im not sure if this works but go to line 57 and look for the } and delete it. or theres a missing { somewhere. Hoped it helped =D
Comment by senos64 on February 14, 2010 at 12:03 pm
can you please put up the code around the 55-60 line area. From the look of the error it looks like you have maybe one to many “}”, or not enough.
Comment by senos64 on February 14, 2010 at 12:07 pm
not sure if this is a smart solution, but it would work I think:
if ($_SESSION['username'])
{ echo “Text for Users”;}
else
{ include ‘index.php’; }
If you are not sure what include does, just google it. It basically checks for whatever is in index.php and puts it in the spot where the include is called for.
Comment by TheFoit on February 14, 2010 at 12:21 pm
Parse error: syntax error, unexpected ‘}’ in /home/a9490936/public_html/JsiteTest/myPHP/phpRegistration/login.php on line 57
Anybody knows how to fix this?
The tutorial is great but i can’t fix this error! Please anybody help me out! I will elaborate more if you wanna help me, pleessssssssssseee,
Thank you to u
Comment by iRsAllNight on February 14, 2010 at 12:41 pm
great tutorial!
simple and well explained!
Comment by Marci2110 on February 14, 2010 at 1:21 pm
how can i make,that a welcome message is shown,when im logged in and the log in form when im logged out?
so it doesn’t work:
session_start();
if ($_SESSION['username'])
{ echo “Text for Users”;}
else
{ echo ” Login-Form “;}
error! (can’t sent cookies…bla bla bla)
if i remove the session_Start it’s always showing the form.
can someone help?
Comment by ThePCchaos on February 14, 2010 at 1:37 pm
i just keep getting “incorrect password!” even if i typed in the right password. what do i do wrong?
Comment by atashi1 on February 14, 2010 at 2:18 pm
thanks man!!
Comment by 1888junkteam on February 14, 2010 at 2:32 pm
excellent work!
Comment by Emad103 on February 14, 2010 at 2:33 pm
thanks a lot mate ….
Comment by filantropika on February 14, 2010 at 2:35 pm
it’s SESSION not SESSOIN
Comment by yasser4ever1 on February 14, 2010 at 2:59 pm
oh thanks so much .. i think that was my mistake but i didn’t notice that thanks again
Comment by shaosenpai on February 14, 2010 at 3:54 pm
i think u spell wrong…
not sessoin but session…
Comment by yasser4ever1 on February 14, 2010 at 4:13 pm
please help me
when i edited the line of code from
$_SESSOIN ['username']==$dbusername;
to
$_SESSOIN ['username']=$username;
it remained the same Welcome, !
i don’t understand why :S
Comment by zmyl16 on February 14, 2010 at 4:57 pm
please
Comment by Lunalunz54 on February 14, 2010 at 5:48 pm
i did all your tutorials but whenever i log in, there is no text appearing like “You’re in”
or “The user doesn’t exist”..there is only a blank document appeared.. why??
Comment by MuhahaSP on February 14, 2010 at 6:45 pm
I tested this and I had an error.
My database contained a user:
ID:1
Username: Thomas
Pass: 123
-> When I tried loging in it wouldn’t work because of my uppercase “T”
How do you make it check for my name but not error for the uppercase letter?
Comment by rluximon on February 14, 2010 at 7:22 pm
amazing, thanks you so much for all of your tutorial
About this blog
This blog is dedicated to showcasing great web design as well as providing advice and tips to any aspiring web designers out there. Hopefully these articles will aid you in your design and development.
25 comments
Comment by gukkie87 on February 14, 2010 at 9:04 am
elvisniperx, after the if statement, instead of using echo, change it to, header(“Location:memberpage.php”);
Comment by wahahe123 on February 14, 2010 at 9:09 am
nice tutorial my good man. well it works perfectly for me the only problem now is how can i put designs on this code? when i’m writting an html code the echo and die doesn’t work anymore. does this tutorial have to be set at a blank page only? ;<
Comment by elvisniperx on February 14, 2010 at 9:09 am
what if i want to proceed directly to the member page after i clicked the LOGIN? what code would i do?
Comment by paulmariz on February 14, 2010 at 10:00 am
please help me when i used the $_session['username']; it always shows an error. the error is like this: undefined index: username. PLS..HOW CAN I FIX THIS?..
Comment by NiallTL on February 14, 2010 at 10:46 am
Just a security note: People can manually change their cookies, so storing just a username and checking that isn’t safe. Store the password hash as well and check it against the DB entry.
Comment by davey1988k on February 14, 2010 at 11:00 am
Thanks dude, you have been very helpful
Works perfectly for me
Comment by DubThisAFoundation on February 14, 2010 at 11:38 am
Anyone know why i get this error msg “incorrect password!” although the script, user name and password are all correct?
Any Help?
Comment by lukie254 on February 14, 2010 at 11:41 am
@TheFoit im not sure if this works but go to line 57 and look for the } and delete it. or theres a missing { somewhere. Hoped it helped =D
Comment by senos64 on February 14, 2010 at 12:03 pm
can you please put up the code around the 55-60 line area. From the look of the error it looks like you have maybe one to many “}”, or not enough.
Comment by senos64 on February 14, 2010 at 12:07 pm
not sure if this is a smart solution, but it would work I think:
if ($_SESSION['username'])
{ echo “Text for Users”;}
else
{ include ‘index.php’; }
If you are not sure what include does, just google it. It basically checks for whatever is in index.php and puts it in the spot where the include is called for.
Comment by TheFoit on February 14, 2010 at 12:21 pm
Parse error: syntax error, unexpected ‘}’ in /home/a9490936/public_html/JsiteTest/myPHP/phpRegistration/login.php on line 57
Anybody knows how to fix this?
The tutorial is great but i can’t fix this error! Please anybody help me out! I will elaborate more if you wanna help me, pleessssssssssseee,
Thank you to u
Comment by iRsAllNight on February 14, 2010 at 12:41 pm
great tutorial!
simple and well explained!
Comment by Marci2110 on February 14, 2010 at 1:21 pm
how can i make,that a welcome message is shown,when im logged in and the log in form when im logged out?
so it doesn’t work:
session_start();
if ($_SESSION['username'])
{ echo “Text for Users”;}
else
{ echo ” Login-Form “;}
error! (can’t sent cookies…bla bla bla)
if i remove the session_Start it’s always showing the form.
can someone help?
Comment by ThePCchaos on February 14, 2010 at 1:37 pm
i just keep getting “incorrect password!” even if i typed in the right password. what do i do wrong?
Comment by atashi1 on February 14, 2010 at 2:18 pm
thanks man!!
Comment by 1888junkteam on February 14, 2010 at 2:32 pm
excellent work!
Comment by Emad103 on February 14, 2010 at 2:33 pm
thanks a lot mate ….
Comment by filantropika on February 14, 2010 at 2:35 pm
it’s SESSION not SESSOIN
Comment by yasser4ever1 on February 14, 2010 at 2:59 pm
oh thanks so much .. i think that was my mistake but i didn’t notice that thanks again
Comment by shaosenpai on February 14, 2010 at 3:54 pm
i think u spell wrong…
not sessoin but session…
Comment by yasser4ever1 on February 14, 2010 at 4:13 pm
please help me
when i edited the line of code from
$_SESSOIN ['username']==$dbusername;
to
$_SESSOIN ['username']=$username;
it remained the same Welcome, !
i don’t understand why :S
Comment by zmyl16 on February 14, 2010 at 4:57 pm
please
Comment by Lunalunz54 on February 14, 2010 at 5:48 pm
i did all your tutorials but whenever i log in, there is no text appearing like “You’re in”
or “The user doesn’t exist”..there is only a blank document appeared.. why??
Comment by MuhahaSP on February 14, 2010 at 6:45 pm
I tested this and I had an error.
My database contained a user:
ID:1
Username: Thomas
Pass: 123
-> When I tried loging in it wouldn’t work because of my uppercase “T”
How do you make it check for my name but not error for the uppercase letter?
Comment by rluximon on February 14, 2010 at 7:22 pm
amazing, thanks you so much for all of your tutorial