Can't keep session continuous between all pages using php
Posted: Sun Jun 22, 2014 10:59 am
I have created a session in php where users log in and their data is transferred in all the pages.it looks like this
It works on all pages except on this one even though i wrote the code in same manner as above one.it looks like this
Kindly visit:http://rewardsinn.com the problem is with categories/stores when selected from dropdown menu the session isn't getting transferred I am new to this coding and had redo everything as we were cheated by a designer.it was working fine till yesterday.Kindly help me in this.Once sign in and check to know the problem.
Code: Select all
<?php ob_start();
session_start();
error_reporting(0);
$_SESSION['url'] = $_SERVER['REQUEST_URI'];
include 'cw-config.php';
if($_SESSION[userid]!='')
{
$details=mysql_fetch_array(mysql_query("select * from register where guid='$_SESSION[userid]'"));
}
?>Code: Select all
<?php ob_start();
session_start();
error_reporting(0);
include 'cw-config.php';
extract($_POST);
extract($_GET);
$_SESSION['url'] = $_SERVER['REQUEST_URI'];
if($_SESSION[userid]!=''){
$details=mysql_fetch_array(mysql_query("select * from register where guid='".$_SESSION["userid"]."'"));
}
$shopdata=mysql_fetch_array(mysql_query("select * from shop where guid='$shopid'"));
?>