Jump to content

Website user database


icekev

Recommended Posts

Hello. I am currently creating my own website. the whole website has some thing that User can see and thing that guess can't see.

 

Now my question is: Can i use the same database for my website and my forum ? like you click a page, eg: Home, and you are still connected. Then you click the forum (PHPBB) and oyu are still connected on the forum.

 

Thanks for you help

Link to comment
Share on other sites

With my webhost I can't connect my database to another website if it is another domain or on another sever. 

If you are scripting with php, the session variable should keep your visitor logged in between pages.

here's a link http://www.suite101.com/content/using-a-php-session-a102893

but the phpfreaks always have great tutorials about such things

Link to comment
Share on other sites

thank you very much for the post but i looked most of my files on my Forum , which was created by my webhost ( hopefully :P ) and it seems that this is in everyfile:

 

 

// Start session management

$user->session_begin();

$auth->acl($user->data);

 

So should i just add this to my normal index.php file on my website ?

or more code should be added ?

Link to comment
Share on other sites

Did you make your own index.php file? such as a homepage? It should be no problem to use that session code. Just paste it.  It should be the first thing in your php tag. Unless things have changed.

And You should have no problem using the same database for your website and forums.  It depends on what you are trying to do with the data.  You should be able to hook into your forums database.

You want people to visit your forum then if they move to another page they can still be logged into the forum?

Link to comment
Share on other sites

Well, i just want the user to stay connected wherever he go on the website ( forum, homepage, new etc...). But i dont see how this simple code will hook the the db? Don't i have to add like where the db is or somthing ?

 

also for my index.php that i did, is there a way to know if the user is connected, to remove those  username/password box and the login button ?

 

Thanks again for you help. Really usefull :P

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.