jacketh Posted January 24, 2011 Share Posted January 24, 2011 Hello there, I've been searching for the answer to this for a while but haven't got anywhere. I'm fairly new at the whole PHP scripting so I maynot be phrasing it correctly Basically I just want a couple of things to happen: 1) A user registers and is shown a page confirming successful registration. This page confirms there details, tells them an email is on the way and they may now login. The problem lies here, I have made it so it inputs the username into the url. For example we end up with something like www.xxxxx.com/login.php?user=Jacketh. I would like it so that username value is input into the Username: input type on the login page. I'm guessing there must be some coding as that link doesn't actually put anything into it, the input does have id and name both as user. 2) Pretty much the same for the email confirmation, the link does the same and creates a query string that inputs the info into the specific fields. Is there a way to then click the submit button automatically or something? Hence if I input there username and password through the string and enforce automatic login? This would be nice if possible! Thanks, Jacketh Quote Link to comment Share on other sites More sharing options...
mike12255 Posted January 24, 2011 Share Posted January 24, 2011 Question One: <?php $username = $_GET['user']; echo "<input type=\"text\" name=\"username\" value\"".$username."\"/>"; ?> Dont quite understand question two sorry. I think your asking to pass the login credentials through the URL and have it auto login the user. This is very unsafe and in my opinion stupid (no offence) most passwords in databases are encrypted ($pass = md5($pass)) so that there would be no way to know what the actually password it because the only way to have pass equal the md5 is by typing in the right password. Quote Link to comment Share on other sites More sharing options...
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.