Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

get session of VB to my privet pages

Links for php scripts

Moderators: macek, egami, gesf

get session of VB to my privet pages

Postby alfann » Thu Dec 29, 2011 9:14 am

Hi,
As we know from this code:
Code: Select all

if (!isset($_SESSION['user_name']) || !isset($_SESSION['user_password'])) {
    header("Location: login.php");
}
?>



the abovve code is added to each page of my folder, assum its name is ABC.
The ABC folder and Forum folder (VB) are placed in my web.
(i.e. if you want to see ABC folder, the link becomes http://www.aaaa.com/ABC
and the same thing for VB
http://www.aaaa.com/VB)

The ABC folder contains many pages such as index.php, article.php, login.php ...etc
each page in this folder includes the SESSION as I wrote in the above.
Therefore, If you opened http://www.aaa.com/ABC/index.php , it will check if you logged in or not. if you not logged in, it will transfere you to login.php

The questions is:
How can I use the same SESSION of the VB? (i.e. if I logged in the VB forum, I will not need to go back to the login.php of the ABC folder when I want to open http://www.aaa.com/ABC/index.php)

I hope that it is clear to you.
:)


Note: the above website is for example.
User avatar
alfann
New php-forum User
New php-forum User
 
Posts: 14
Joined: Wed Dec 28, 2011 11:00 pm

Re: get session of VB to my privet pages

Postby alfann » Thu Dec 29, 2011 9:18 am

Also, the VB folder is Encrypted. Therefore, I cannot see any thing.
User avatar
alfann
New php-forum User
New php-forum User
 
Posts: 14
Joined: Wed Dec 28, 2011 11:00 pm

Re: get session of VB to my privet pages

Postby alfann » Thu Dec 29, 2011 10:42 am

I attached the login.php file of VB
Attachments
login.zip
(3 KiB) Downloaded 30 times
User avatar
alfann
New php-forum User
New php-forum User
 
Posts: 14
Joined: Wed Dec 28, 2011 11:00 pm


Return to PHP Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron