Session variables lost after header redirect Even i Used session_start(); in All Pages
Here My Code..
<?php
session_start();
$id=$_REQUEST['id'];
$pid=$_POST['pid'];
$_SESSION['pid']=$_POST['pid'];
Add To Cart Function
include("cart/functions.php");
if($_REQUEST['command']=='add' && $_REQUEST['id']>0){
$id=$_REQUEST['id'];
addtocart($id,1);
header('location:shoppingcart.php');
exit();
}
After Click On This Button $_SESSION['pid']=$_POST['pid'];` Disappear From All Pages?
<input type="button" class="button1" value="Add To Cart"
onclick="addtocart(<?php echo $row3['id']?>);" />
</div>
</div></form>