I have a bit of code and I'm trying to use a conditional 'if' statement to check its value - unfortunately, I think I'm setting its value instead.
Here's the code:
Code: Select all
<?php
if ($_SESSION['state']=='LA')
?>
Am I setting the 'state' value or checking it? Its weird because I'm storing the $_SESSION value for 'state', but when I get to this page, it switches back to 'LA' no matter what I have entered on the previous pages to set it. That's why I suspect that this code is kind of iffy.
Am I checking the variable against 'LA' or setting it? Ideally, I'd like to just check it.
Thanks!