Jump to content
MakeWebGames

Recommended Posts

Posted

I have this login form for the MAIN PAGE of my site...

 

<h2>Login Form</h2>
                                     	<form id="login-form" action="">
                                        	<div><input type="text" value="Name" class="input"/></div>
                                        	<div><input type="text" value="Password" class="input"/><input type="image" src="images/login-button.gif" /></div>
                                     	</form>

 

How would i make it login to multiple games on one site? (2 games in sub directory folders and my forums)

This form is setup in my MAIN public_html directory but i want it to auto log people into my forums/games (mostly the forums the games part i can figure out later if needed)

but yeah... how to i make a login form in a ROOT DIRECTORY log users into multiple sub folder scripts/games/forums/etc.

Posted

its 1am where im at soz

i can only think of 1 way to do it right now i could probably think of more l8tr depends on what comes to mind

the way is on submit u can have check for the username and password in 2 different queries then send off 4 session variables loggedinsite1,loggedinsite2,useridsite1,useridsite2 or whatever you use to define your users

Posted

That's basically all i'm looking for, how would i code something like that?

(All my sites are md5 encrypted etc, for now til i change it to sha512 or somethin)

my subdirectory site that is mccodes, the login looks like this

 

<script language="JavaScript" type="text/javascript">
var usr;
var pw;
var sv;
function getme()
{
usr = document.login.username;
pw = document.login.password;
sv = document.login.save;

   	if (GetCookie('player') != null)
   	{
           	usr.value = GetCookie('username')
           	pw.value = GetCookie('password')
           	if (GetCookie('save') == 'true')
           	{
                   	sv[0].checked = true;
           	}
   	}

}
function saveme()
{
   	if (usr.value.length != 0 && pw.value.length != 0)
   	{
           	if (sv[0].checked)
           	{
                   	expdate = new Date();
                   	expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000));
                   	SetCookie('username', usr.value, expdate);
                   	SetCookie('password', pw.value, expdate);
                   	SetCookie('save', 'true', expdate);
           	}
           	if (sv[1].checked)
           	{
                   	DeleteCookie('username');
                   	DeleteCookie('password');
                   	DeleteCookie('save');
           	}
   	}
           	else
   	{
           	alert('You must enter a username/password.');
           	return false;
   	}
}
</script>

 

so the login is at gamesite.com/gamefolder/login.php

the login i want to work for that and one other subdirectory is at http://www.gamesite.com/ (root/public_html)

how would i make it see that one and one other one that is coded in phpbb3? (Similar and also md5 encrypted)

Posted

My view on this would be don't delay changing it from md5 to another encrption. I hope you're not going to get people to join, then change the encryption becuase that's a totally bad idea. Change it as soon as possible becuase there is no point hangining around if you already got it planned in you're head that you're going to be changing the encryption.

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...