whizzykid Posted May 4, 2009 Share Posted May 4, 2009 Hi all,I am creating a website i am almost through with that but when i get to the part of linking the username entered in the databse to an account i get stuck. can Any1 help? Quote Link to comment https://forums.phpfreaks.com/topic/156827-help-needed/ Share on other sites More sharing options...
the182guy Posted May 4, 2009 Share Posted May 4, 2009 Show us your database structure. Quote Link to comment https://forums.phpfreaks.com/topic/156827-help-needed/#findComment-826041 Share on other sites More sharing options...
Maq Posted May 4, 2009 Share Posted May 4, 2009 Hi all,I am creating a website i am almost through with that but when i get to the part of linking the username entered in the databse to an account i get stuck. can Any1 help? We need more information. You should have an auto-increment id for the username's primary key. Quote Link to comment https://forums.phpfreaks.com/topic/156827-help-needed/#findComment-826061 Share on other sites More sharing options...
whizzykid Posted May 5, 2009 Author Share Posted May 5, 2009 this the code if (isset($_POST['Login'])) { $loginUsername=$_POST['Login']; $password=$_POST['Password']; $MM_fldUserAuthorization = ""; $MM_redirectLoginSuccess = "/my profile.php"; $MM_redirectLoginFailed = "/Login Failed.php"; $MM_redirecttoReferrer = false; mysql_select_db($database_inteecom_ellen, $inteecom_ellen); $LoginRS__query=sprintf("SELECT Login,Password FROM `Customer Login` WHERE Login=%s AND Password=%s", GetSQLValueString($loginUsername, "int"), GetSQLValueString($password, "int")); $LoginRS = mysql_query($LoginRS__query, $inteecom_ellen) or die(mysql_error()); $loginFoundUser = mysql_num_rows($LoginRS); if ($loginFoundUser) { $loginStrGroup = ""; //declare two session variables and assign them $_SESSION['MM_Username'] = $loginUsername; $_SESSION['MM_UserGroup'] = $loginStrGroup; for every person tht logs in takes them to the same account information,how can i make it display account information per login and password info? Quote Link to comment https://forums.phpfreaks.com/topic/156827-help-needed/#findComment-826483 Share on other sites More sharing options...
Ken2k7 Posted May 5, 2009 Share Posted May 5, 2009 You have a space in a filename? Why do people do that!? Change the space to %20. Also read guideline #4 - http://www.phpfreaks.com/page/rules-and-terms-of-service#toc_forum_guidelines Quote Link to comment https://forums.phpfreaks.com/topic/156827-help-needed/#findComment-826494 Share on other sites More sharing options...
whizzykid Posted May 5, 2009 Author Share Posted May 5, 2009 Hi thank you but the file name is ok,i just want to why everytime any1 logs in it take them to the same account page as every1 else tht logs in. Quote Link to comment https://forums.phpfreaks.com/topic/156827-help-needed/#findComment-826499 Share on other sites More sharing options...
Ken2k7 Posted May 5, 2009 Share Posted May 5, 2009 I'm guessing because you're converting a string into an int in GetSQLValueString($loginUsername, "int"). Same for password. They should be strings. Quote Link to comment https://forums.phpfreaks.com/topic/156827-help-needed/#findComment-826509 Share on other sites More sharing options...
whizzykid Posted May 5, 2009 Author Share Posted May 5, 2009 Hi thank you on my database i set to int, that is not wht i am refering to,i wil explain. I create a login in form when people login it takes them to a particular redirect page i set,but i want it to display username i get from my form on the the redirect page. Quote Link to comment https://forums.phpfreaks.com/topic/156827-help-needed/#findComment-826541 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.