alex1985 0 Report post Posted February 27, 2008 Hello, everyone. I need your help again. This forum is quite good for it.Well, I need create a registration form for my web-site using PHP and SQL. The information it should contain: 1) User Name2) First Name3) Last Name4) Password5) e-mail Address6) Security Image: that images helps to protect a random registration, for instance, 56+2=where user have to type an answer in order to finish registration. That's all for today. Anymore things, I will post another post over here. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted February 27, 2008 Have you searched through the Tutorials yet?Seems to me that there are a couple of Tutorials that do that. You might need to stitch a few together to do exactly what you want. one for the log-in and another for the captcha question. You would need cookies or sessions for the captcha, I think. And a database for the log-ins.Or look at a Content management System with user Log-ins. Do you need the Log-ins to 'protect' pages from clients who are not registered? Would a Forum software work? Share this post Link to post Share on other sites
alex1985 0 Report post Posted February 27, 2008 So, could you just explain how you do the registration form page by illustrating the sample codes. If there are tutorials, just give those links that I can follow up.[hr=noshade] [/hr]Yes, I need to create some kind of login page to my web-site. Sorry for that, I did not read your reply carefully. Share this post Link to post Share on other sites
galexcd 0 Report post Posted February 28, 2008 Like jlhaslip said there are many tutorials of doing this, and if you need help getting basic sql syntax you can always do a google search and therefore I'll give a quick overview of how to do what you want. First you'll want to set up a database of useres. So make a new table called "users" and make 5 varchars: UsernameFirst nameLast nameemailCaptchaYou can make the lengths of these whatever you feel would be appropriate.Now make a varchar for the password length 32 (if you want to use md5 encryption). Now the way I would make the captcha is by making a separate table called captcha and have the following fields: IP captcha Now to actually make the dynamic captcha image itself you will have to know a bit about Php GD library. If you follow that link, however, you should get all the info you need to make one. Now here is the basic login functionality explained: When you login, php first finds the username that matches from the rows in the database, then it encrypts the password you gave it and checks that against the encrypted password in the database, if it is a match then it generates a new session and makes a cookie on the users computer with that session on it. Whenever you navigate a page, it looks up that session id against the server and lets you view the content. Now for the captcha. Whenever that dynamic image is viewed, look up the row with the user's IP address and give it a new random captcha, or if the users IP doesn't exist then make a new row, and display the captcha. Then when registering make sure the captcha entered is the same as the one in the database. If it is a match then you're good! Share this post Link to post Share on other sites
alex1985 0 Report post Posted February 28, 2008 It's clear and lucid, but what is the PHP code itself? Share this post Link to post Share on other sites
alex1985 0 Report post Posted March 7, 2008 So?! Could some one help me, or just give the link to the tutorial! Share this post Link to post Share on other sites