Jump to content
MakeWebGames

Recommended Posts

Posted

I have noticed something about mcc based games that differed greatly from the larger more popular games .... when you create an account, you are automatically logged in, or you have to verify your e-mail addy. Not redirected back to the login screen just to type in more information. In order to get players into a game faster without them loosing interest, Id like to see a register page that takes them right into the game, beginner tutorial or another place IN GAME already logged in... (there are mods for e-mail already.) Ive heard theres lots of ways to do it, but never actually seen one that worked.This could be a paid or a free mod.

Budget: $20 USD

Posted

lmao Jordan, you know me, if I've got no clue what it would cost, ill overpay just to make sure ill get it. So When DJK says meta tag, thats referring to the html meta tags right? And how would one send them via a meta tag (Ive read up on it, but it might as well be greek to me) ...so long as the session is assigned ... can you explain that one as well? granted Ive been up for far to long (the sun has come back up already) but I would like to learn why / how this works, not just copy the code and call it good. As most of you are aware, Im a much better artist than coder.

Posted
DJK means a meta tag refresh to index.php so they register and auto redirected to the game.

Personally I prefer header location

header('Location: index.php');

I prefer that to however in this case it really wouldn't work unless you had the success message ingame otherwise you'd need the meta tag.

Posted

I would personally use the header tag aswell.

Now the session assign means basically..

When a user logs in, It simply sets a session to 1 and assigns the usersID to another session, so basically as long as those are assigned right your auto login should work perfect. =)

Posted

the more you tell me, the more confused I get .... header('Location: index.php'); whats that do? just send them to that file ... how and when? ill also look up meta refresh to see if it does that ... cus from what I understand of all this is that I set the session, if I have a meta refresh, after a set time, the page refreshes automatically and it sends the user to loggedin.php (or whatever file I put there) ... that about the gist of it?

Posted

META works on a time yeah header location is instant so when they click register or whatever after filling out the form (obviously) it would direct them to whatever file.

Personally i do that on CG lol

Posted

I don't mean to be an ass Paul, but if you spoke in terms I could understand, I might consider your way of doing this. Otherwise, I don't even know what you are talking about, and that lends your "you should do it this way argument" no weight.

Posted

Okay take this as an example,

$i is the variable assigned to the last id signed up to your game, for example 329.

Setting the session of userid ($_SESSION['userid']) to have the value of $i ($_SESSION['userid'] = $i;) will give it 329 which now means that the user with the id of 329 is now logged into your game.

Upon completion you have two options to get the desired results

header('Location: index.php');

The upside is that this will redirect instantly, the downside is you cannot have any output before it for example a welcome message.

The meta tag allows you to refresh after a set amount of time so for example you can have:

Welcome to the game after a successful registration, then you can set the meta tag to refresh to index.php after say 2-3 seconds, giving them enough time to read the welcome message.

Either way will work, just depends on how you'd like to do it.

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.

×
×
  • Create New...