Jump to content

are the session conflicting ?


vinpkl

Recommended Posts

hi all

 

i m having two separate restricted access folders based on separate login forms and sessions.

 

i m using same technique for both folder files. everything works fine for first folder but having trouble with second folder files.

 

i have a form page in second folder which is accessible only after the user gets logs in.

 

when a user logs in second folder then a session repair_access is set to true for second folder.

$_SESSION['REPAIR_ACCESS'] = true;

 

after loggin the user enter information in the form, when he click submit button the information is getting stored in database correctly but he is redirected to index.php which is login page.

 

i m not able understand that if the user reaches the form page that means the SESSION has been set to true but then why is he redirected back to loginpage when he clicks submit button.

 

this is my config file for second folder

 

$conn3=mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db('repair_data', $conn3);
session_start();

 

this code is on top of my form in second folder

<?php require_once("config.php");
if(!isset($_SESSION['REPAIR_ACCESS']))
header("Location:index.php");
$msg="";
?>

 

Are the sessions conflicting with anything ?

 

vineet

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.