Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.