Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Php Code Needed, Working Together?
alex1985
post Feb 27 2008, 05:53 AM
Post #1


Super Member
*********

Group: [HOSTED]
Posts: 387
Joined: 9-February 08
Member No.: 57,615



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 Name
2) First Name
3) Last Name
4) Password
5) e-mail Address
6) 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.


Go to the top of the page
 
+Quote Post
jlhaslip
post Feb 27 2008, 06:46 AM
Post #2


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,882
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



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?
Go to the top of the page
 
+Quote Post
alex1985
post Feb 27 2008, 07:17 AM
Post #3


Super Member
*********

Group: [HOSTED]
Posts: 387
Joined: 9-February 08
Member No.: 57,615



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.


Yes, I need to create some kind of login page to my web-site. Sorry for that, I did not read your reply carefully.
Go to the top of the page
 
+Quote Post
galexcd
post Feb 28 2008, 04:23 AM
Post #4


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
*********

Group: [HOSTED]
Posts: 975
Joined: 25-September 05
From: The dungeon deep below the foundation of trap17
Member No.: 12,251



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:
  • Username
  • First name
  • Last name
  • email
  • Captcha
You 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!
Go to the top of the page
 
+Quote Post
alex1985
post Feb 28 2008, 06:43 AM
Post #5


Super Member
*********

Group: [HOSTED]
Posts: 387
Joined: 9-February 08
Member No.: 57,615



It's clear and lucid, but what is the PHP code itself?
Go to the top of the page
 
+Quote Post
alex1985
post Mar 7 2008, 03:33 PM
Post #6


Super Member
*********

Group: [HOSTED]
Posts: 387
Joined: 9-February 08
Member No.: 57,615



So?! Could some one help me, or just give the link to the tutorial!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How do you test your php code(75)
  2. Php Clock(7)
  3. Change Permission With Php Code(3)
  4. Adapting Html Code Embed To Work On Phpnuke(7)
  5. Dynamic Image / Signature Generator(12)
  6. Wap Source Code Viewer(4)
  7. How To Make A Random 7 Number Code?(2)
  8. Creatting A Playlist Through Php(5)
  9. Whats Wrong>?(9)
  10. Wamp Packages Needed To Test Scripts(1)
  11. Awesome Source Code Viewer Script(7)
  12. Html Code Tester. Online Script(15)
  13. I Need Some Proof Reading For My Code Please! [resolved](7)
  14. Will This Code Work(5)
  15. Use Rss In Php Code(3)
  1. Script Not Working(6)
  2. Slaed Cms(2)
  3. Php Code(15)
  4. Php Code?(12)
  5. Looking For Command Line Based Sql Modification(1)
  6. Php Code Needed Iii(10)
  7. Tools Needed!(9)
  8. Admin Page(4)
  9. Php And Mysql Programming(2)
  10. Tutorial Needed?!(11)
  11. Malicious Code Injection(3)
  12. Php Source Code Unveiled In Browser?(7)
  13. Create Table - Mysql Code - Help(1)


 



- Lo-Fi Version Time is now: 26th July 2008 - 04:18 PM