spooke2k Posted June 13, 2007 Share Posted June 13, 2007 if (isset($_SESSION['Test'])) { if($_POST['textfield'] == "Search Criteria") { }else{ $_SESSION['Test'] = $_POST['textfield']; } }else{ $_SESSION['Test'] =$_SESSION['Test']; } what im trying to do is check if the txtfield has changed value if it has and isnt "search criteria" then change the variable session to the post textfield, if the $_POST['textfield'] == "Search Criteria" then hold that last session variable which is not "Search Criteria" if you see what i mean so that it remebers the last value in the session which is not "Search Criteria" until something else is entered that is not "Search Criteria" so even after 10 php_selfs it still holds that good value Thanks in advance Spooke2k Quote Link to comment https://forums.phpfreaks.com/topic/55489-cant-work-cjeck-out/ Share on other sites More sharing options...
Link Posted June 13, 2007 Share Posted June 13, 2007 if (isset($_SESSION['Test'])) { if (strtolower($_POST['textfield']) != "search criteria") { $_SESSION['Test'] = $_POST['textfield']; } } Does that do the same thing? Quote Link to comment https://forums.phpfreaks.com/topic/55489-cant-work-cjeck-out/#findComment-274214 Share on other sites More sharing options...
spooke2k Posted June 13, 2007 Author Share Posted June 13, 2007 no that doesnt seem to work as its still not storing variable until something else is entered other than "seach" etc Quote Link to comment https://forums.phpfreaks.com/topic/55489-cant-work-cjeck-out/#findComment-274228 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.