Jump to content


PHP/MySQL Login


3 replies to this topic

#1 crushed

    Young Padawan

  • Members
  • Pip
  • 30 posts

Posted 08 July 2005 - 05:32 PM

I have searched a lot, and I cannot find a simple tutorial with details about creating a PHP/MySQL login script. I am new to MySQL, since I just now have gotten a host that supports MySQL DB's, which is strange, I know. I know how to do this through text file very easily, but am looking for help with combining this with MySQL. The things I need help (or coding) for is this:
  • A form that will register a username, password, and email into the DB
  • A login script that will let the user into the page if their username and password match
  • and, if not too much of a worry, a setting that can specify if the user is an admin or not, which will direct them to which admin panel
So I was thinking, when the form is submitted (the registration form, which only the admin can use, where he can register members) it will send the username, password, and email of the user (for CMS purposes) into a DB, and perhaps a value of 0 (not an admin) or 1 (an admin) along, so that after posting content and such, it could check to see their value of 0 or 1, if 1 take them to the admin panel, if 0, only display options for posting content.

#2 indenial

    Young Padawan

  • Members
  • Pip
  • 7 posts
  • Location:Tenn.
  • Interests:Programming

Posted 08 July 2005 - 06:51 PM

Login Tutorials

There's 2 pages of Login tutorials and some even do an admin page like you wanted. Hopefully that can get you started :D

#3 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 09 July 2005 - 12:31 AM

Not sure what those tutorials say, but for some info on using mySQL...

First off, i would suggest finding phpmyadmin on your host. Most hosts use cPanel, so in the mySQL section (near the bottom), there should be a link to phpmyadmin on your server.

Second, read this: http://www.pixel2lif...?showtopic=8335

Last, i would suggest learning to do this yourself, as it will pay off later (if you decide to go further with php). But if not, then you can drop me a pm and we can chat about setting this thing up.

#4 crushed

    Young Padawan

  • Members
  • Pip
  • 30 posts

Posted 23 July 2005 - 10:56 AM

Thanks RC, and I did go with your suggestion. I am now learning PHP/MySQL hand-in-hand daily. Thanks for the helpful post!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users