shadowspy1 Posted December 25, 2009 Share Posted December 25, 2009 I'm having an issue with one section on my website dealing with sessions. Now I know that myself and two other individuals can get it to work without any issues on IE, FF, or other browsers, however, others cannot get it to work. Maybe someone can help me in the right direction? <?php session_start(); include "db.php"; ?> <?php if(!empty($pilotid)){ ?> <input type="submit" name="Submit" value="Submit Bid"> <? } ?> This Submit button is where the issue is at. It is not showing up for everybody like I mentioned before. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/186335-php-session-issue/ Share on other sites More sharing options...
ignace Posted December 25, 2009 Share Posted December 25, 2009 What's in db.php? Where does $pilotid come from? We need more information to give you a solution Quote Link to comment https://forums.phpfreaks.com/topic/186335-php-session-issue/#findComment-984002 Share on other sites More sharing options...
shadowspy1 Posted December 25, 2009 Author Share Posted December 25, 2009 DB.php is the information stored for the connection to the database. Pilotid is the variable name that I gave for the session['pilotid'], which is registered when it is logged in. The issue is that the session variable works on other pages, but doesn't seem to work on the page this code is on. Quote Link to comment https://forums.phpfreaks.com/topic/186335-php-session-issue/#findComment-984007 Share on other sites More sharing options...
teamatomic Posted December 25, 2009 Share Posted December 25, 2009 $var = $_SESSION['var']; HTH Tetamatomic Quote Link to comment https://forums.phpfreaks.com/topic/186335-php-session-issue/#findComment-984009 Share on other sites More sharing options...
shadowspy1 Posted December 25, 2009 Author Share Posted December 25, 2009 I have pilotid identified as that after the include, but for some reason forgot to include it in the code. $pilotid = $_SESSION['pilotid']; Quote Link to comment https://forums.phpfreaks.com/topic/186335-php-session-issue/#findComment-984017 Share on other sites More sharing options...
shadowspy1 Posted December 26, 2009 Author Share Posted December 26, 2009 Any ideas or should I just post the whole page of code for dissection? Quote Link to comment https://forums.phpfreaks.com/topic/186335-php-session-issue/#findComment-984123 Share on other sites More sharing options...
teamatomic Posted December 26, 2009 Share Posted December 26, 2009 play detective. echo out $pilotid before your if and see if it is what you expect. HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/186335-php-session-issue/#findComment-984129 Share on other sites More sharing options...
shadowspy1 Posted December 27, 2009 Author Share Posted December 27, 2009 Well, it seems the issue is fixed, sort of. People are having no issues with Firefox, however, in IE, the issue still persists. Quote Link to comment https://forums.phpfreaks.com/topic/186335-php-session-issue/#findComment-984558 Share on other sites More sharing options...
shadowspy1 Posted December 27, 2009 Author Share Posted December 27, 2009 I'm not having any issues myself in Firefox or IE, so it's hard for me to judge what is exactly going wrong with this code. Quote Link to comment https://forums.phpfreaks.com/topic/186335-php-session-issue/#findComment-984562 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.