Jump to content
MakeWebGames

Auto Login on Register


sniko
 Share

Recommended Posts

Simple edit, that will automatically log the user in upon sign up, which will make user experience better, as they don't have to enter their details twice to play for the first time.

Open up register.php, and at the top, below line 1, add;

session_start();

Now, find the following snippet; (Code Mucked Up?)

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

and directly below it add; (Code Mucked Up?)

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

If you get the following error; Cannot modify header information

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

And that's it.

-sniko

Edited by sniko
Added fix to "Cannot modify header information"
  • Like 1
Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

 Share

×
×
  • Create New...