Please help me on this problem. It is small but causing me lot of trouble.I have set the session variable in my index.php and when clicked on anchor tag , it is not changing the session variable. Relevant PHP part:
session_start();
$_SESSION["amount"] = "99";
Now the html part (in same PHP file).
<a onclick="change('<?php echo $_SESSION['amount']='399'; ?>')" href="#"><h4>Order 399</h4></a>
<a onclick="change('<?php echo $_SESSION['amount']='200'; ?>')" href="#"><h4>Order 200</h4></a>
I am checking the value of Session variable in another div in same file.
<td>Amount: <?php echo $_SESSION["amount"] ?> </td>
the value shown is 200 though clicked on "Order 399".
How do I change session variable?Am I mixing Client side and server side? Please help me and do suggest the shortest possible way to do it.