Jump to content

[SOLVED] Always root user


frenchpl

Recommended Posts

I am newish to PHP so please be gentle with me here.

I have written a whole suit of scripts to control an imaginary company.

So far they are all working together.

I have a datacon.php, which has the normal connect the root user stuff in it.

I have head and foot scripts, again normal as far as I can see.

I want to use the require once, with the datacon, just to log in the user that is trying to log in.

Whatever I have tried I cannot get anything to work correctly, if I do not include the datacon.php in each script.

This seems to defeat the object of having a log in for other users.

I am using SESSIONS and have the session start at the top of each file.

I know this is working because I am echoing the session ID from every file.

Obviously I am missing something, though a few books later I am none the wiser.

The other question about this lo gin stuff is this. 

I have created a company database which has a 'users' table, which has an 'admin' or root user in it.

When I log in with the log in script I want to enable the admin user that I have created or another user and NOT the admin user in the mysql database user table.

How do I do this?

Thanks guys

Pete

Link to comment
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.