Jump to content

[SOLVED] Login Query!?


Snooble

Recommended Posts

Hello, I'm a beginner with all web coding. My task is to create a log in system. This is my assumption.

use db connect to connect to mysql database.

have an if statement at the start of each page. (If user logged in then allow to see page, else login.php)

select "views etc." from "table" where "username" "password"


Sorry, but this is just a few things i've gathered from looking at this forum. Would this be the way to go. When i say views etc. i assume they'll be set variables.

My main question is:

How do i save a variable, e.g. Credits. To a DB and then echo that out per individual user. Would it involve select credits from table where "username" "password"

Also, in the register file how would i take the username and password variable and place it into the database. I know how to carry a variable from page to page to page in hidden fields. But i'd like to get a login system sorted.

Sorry if this is hard to understand. But it's my dotted mind at the moment.

Snooble
Link to comment
https://forums.phpfreaks.com/topic/36119-solved-login-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.