KDawg08 Posted January 22, 2010 Posted January 22, 2010 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. Quote
bluegman991 Posted January 23, 2010 Posted January 23, 2010 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 Quote
KDawg08 Posted January 23, 2010 Author Posted January 23, 2010 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) Quote
KDawg08 Posted January 24, 2010 Author Posted January 24, 2010 any suggestions on how to do this? with maybe a small tutorial? Quote
Redex Posted January 24, 2010 Posted January 24, 2010 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.