Need help with PHP + MySQL

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
TheChiller
Forum Newbie
Posts: 1
Joined: Thu Dec 01, 2011 5:03 am

Need help with PHP + MySQL

Post by TheChiller »

Hello

First off let me tell you, that I am i noob in PHP/MySQL
Í need help with making a login page and when the user logs in, his/her's info from MySQL is presented in a table on the site. The info should be: ID#, Number of chips, URL and Hits.

So do I need a table with 4 column og 6 columns (if the username and password are supposed to go in the same coloum??)) and the user must be able to edit the "URL" og delete whole column.

The systems have to be able to support multiple users, so that when a person logs ind, that person
is presented with his/her's specifik coloums.

How do I get startet on this and does it sound easy to you PHP/MySQL experts??

I hope you understand me!

Best regards!
coolpriya073
Forum Newbie
Posts: 4
Joined: Thu Jan 05, 2012 11:11 pm

Re: Need help with PHP + MySQL

Post by coolpriya073 »

yes..it very simple..

if you want to allow user to delete complete row than go with 2 tables instead of 1.

Because if you delete the complete row and there is password and username in it..he will not able to login again,

So,

Step 1 : Create 2 tables, 1 for login and 1 for storing information
Step 2 : Create a login form
Step 3: Set session cookie
Step 4: Bring data from another table.
Step 5: I guess you also need something so user can add beside modify,
Create accordingly,

Login Table will have minimum 2 columns, you can create more if you want

Username, Password

Second Table will have

All the fields you require and Username of the person adding this.Date will be helpful if you want to sort or view according to it.

So, start with step 1 and feel free to ask for help
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Need help with PHP + MySQL

Post by califdon »

It can be simple or it can be secure, flexible, and easy to use. I would strongly advise you to read some tutorials on how other developers have done this and decide which one fits your needs. Use any search engine and search for the keywords php login tutorial, then read at least 3 or 4 of them. What is good for some people may not be good for you. Remember, a login script is only part of the job, you must have a way for them to register and ways to update or correct their registration, change passwords, etc. If you are going to use a database (MySQL), be sure you understand how to do that. There are hundreds of tutorials on MySQL. Some of them are even good.
Post Reply