I have some value for carry one page to another. For that I can use Ajax, Jquery or take them in form hidden field and post them by link. But I am trying it by session and session is good for hold the variable and can access just by declaring the variable. The issue is that, I have different item with price select by users so when they select the info should go on next page.
In case user want to switch his item then the session variable should switch the value but its not happening.
I tried this, not working
<?php
session_start();
if($_SERVER['REQUEST_URI']="/example/?page_id=150")
{
unset($_SESSION['price']);
//session_destroy();
}
?>
lets suppose I have three price in loop by $price, and I just store it in $_SESSION variable, If user select Price 1 then $_SESSION variable have Value of price1, Now IF he Again come to that page and change price1 to price2, then how $_SESSION store price2....
I can do this in other way but, Is it possible by session? Or any other way to do this?
Thanks..
=
instead of comparison operator==
inif
condition