Serifaz Posted January 30, 2011 Share Posted January 30, 2011 Hey guys I recently got a drop down log in script from http://tutorialzine.com/2009/10/cool-login-system-php-jquery/ I like this log in system a lot but I want to change up the registration process a little I want to make it so that instead of having an email sent to you with a password that you can not change. I want the user to specify there own password. basically I want to replace the email box with two password boxes the second for verifying the pass... any help would be greatly appreciated. p.s. I also am not very knowledgeable in php or sql for that matter so please be specific about what it is I need to do. Quote Link to comment https://forums.phpfreaks.com/topic/226097-help-with-php-login-script/ Share on other sites More sharing options...
Serifaz Posted January 31, 2011 Author Share Posted January 31, 2011 anyone? Quote Link to comment https://forums.phpfreaks.com/topic/226097-help-with-php-login-script/#findComment-1167596 Share on other sites More sharing options...
Serifaz Posted February 1, 2011 Author Share Posted February 1, 2011 Please if anyone knows how to fix this I would be very grateful. The only reason I am bumping this is because I really need to figure this out... Again if you know anything or can help me please reply. Quote Link to comment https://forums.phpfreaks.com/topic/226097-help-with-php-login-script/#findComment-1168216 Share on other sites More sharing options...
crabfinger Posted February 1, 2011 Share Posted February 1, 2011 Why not comment on the article? You're probably more likely to get the help you want. I can only speak for myself but I'm not going to jump right in to give you suggestions about how to use a language you don't have a clue how to use in the first place. My only suggestion is to visit http://www.php.net and RTFM (Read the Friendly Manual). Quote Link to comment https://forums.phpfreaks.com/topic/226097-help-with-php-login-script/#findComment-1168218 Share on other sites More sharing options...
Serifaz Posted February 1, 2011 Author Share Posted February 1, 2011 I did comment on the article... they took down my post. I think it may be because the post is old or something. and also I do know a bit about php and css... but I'm not good with the sql aspect of it... all I'm trying to do is add a password field instead of an email field... I know how to change it so that it would take a password. I just don't know how to make it actually go in the db. sorry I know I must be frustrating. but I'm just trying to figure this problem out. Quote Link to comment https://forums.phpfreaks.com/topic/226097-help-with-php-login-script/#findComment-1168221 Share on other sites More sharing options...
denno020 Posted February 1, 2011 Share Posted February 1, 2011 I would probably suggest keeping the email box, it is kind of important in a registration thing. But it's up to you if you remove it. Assuming you already know how to add the text box for the input of a password (which you said in the post above this), change line 107 of demo.php from: $pass = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6); to $pass = $_POST['pass']; This is very simply grabbing the password that is posted to the form, same as the email and username are grabbed. That is all you need to change, the sql can stay as it is (I think, there is some .md5 stuff there, and I'm not familiar with it and how it operates, all I know is that it encrypts data). Try that and see how you go. Even though I've given the answer, I second what crabfinger said. Googling and reading for yourself will give you a much greater chance of remembering how to do something later. Denno Quote Link to comment https://forums.phpfreaks.com/topic/226097-help-with-php-login-script/#findComment-1168229 Share on other sites More sharing options...
Serifaz Posted February 1, 2011 Author Share Posted February 1, 2011 thank you soo much ... and I will take what you guys said very seriously as I do enjoy working on websites so I would like to expand my horizons Quote Link to comment https://forums.phpfreaks.com/topic/226097-help-with-php-login-script/#findComment-1168242 Share on other sites More sharing options...
crabfinger Posted February 1, 2011 Share Posted February 1, 2011 This is susceptible to an sql injection. $pass = $_POST['pass']; Remember mysql_real_escape_string(); $pass = mysql_real_escape_string($_POST['pass'] Quote Link to comment https://forums.phpfreaks.com/topic/226097-help-with-php-login-script/#findComment-1168374 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.