Jump to content

Login script


obeygravity

Recommended Posts

Hey, I am trying to make a website with a back-end section for admin to updat the site without having to use html code. I have used this tutorial for the login portion: http://www.phpeasystep.com/phptu/6.html

 

On my localhost everything works perfectly but when I upload this on my webspace there is an issue. Normally (localhost) when you want to go to admin.php (in the tutorial login_succesfull.php) and you have not logged in it will rederict you to the login page, but now it doesn't. If you go directly to the login.php and you enter the username and password it 'logs you in' and directs you to login_succesfull.php. I have updated all the info in checklogin.php to match the info from the webspace.

 

I have no clue why it will work locally but not on a webspace, do you?

 

ps: sorry for the bad english

Link to comment
Share on other sites

I suggest you look at the php.net site. session_register() and session_is_registered() are deprecated as of php version 5.3 and removed as of version 5.4

 

Not only that, but your site may have php settings configured that you may not be able to use those two functions, even if they have a version lower.

 

For more information check out:

session_register() and session_is_registered()

Link to comment
Share on other sites

Scrap that tutorial, it's WAY out of date. Instead I recommend that you read this article about secure login systems, a lot more up-to-date and it contains almost all of the information you need.

Might seem a bit heavy and overly complex, but in order to write properly secure login systems you need to know all of that.

Link to comment
Share on other sites

Scrap that tutorial, it's WAY out of date. Instead I recommend that you read this article about secure login systems, a lot more up-to-date and it contains almost all of the information you need.

Might seem a bit heavy and overly complex, but in order to write properly secure login systems you need to know all of that.

 

Yeah it looks like a bit of overkill for what I need but i'll give it a go ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.