elhelaly1999 Posted July 29, 2008 Share Posted July 29, 2008 I make a block contain that code <?php session_start(); if($_SERVER['HTTP_REFERER'] == 'http://example.com/') { $_SESSION['test'] = 'ok'; include('bar.html'); } elseif($_SESSION['test'] == 'ok') { include('bar.html'); } ?> it works fine on firefox but not working on IE7 I want to know where is the error ? Link to comment https://forums.phpfreaks.com/topic/117118-my-code-and-drupal-and-ie7/ Share on other sites More sharing options...
MasterACE14 Posted July 29, 2008 Share Posted July 29, 2008 do you know which part of the code isn't working? like the first or second if? Or is the whole code not working. with IE7 do you have sessions enabled? Link to comment https://forums.phpfreaks.com/topic/117118-my-code-and-drupal-and-ie7/#findComment-602396 Share on other sites More sharing options...
elhelaly1999 Posted July 29, 2008 Author Share Posted July 29, 2008 thanx MasterACE14 , I am so happy that I always find ur replies The code workes perfectly on firefox and the session enabled on firefox and IE7 but the example.com have frames I think the problems in frames , is that right ? Link to comment https://forums.phpfreaks.com/topic/117118-my-code-and-drupal-and-ie7/#findComment-602411 Share on other sites More sharing options...
MasterACE14 Posted July 29, 2008 Share Posted July 29, 2008 possibly. I believe the problem is more likely to be from this line... if($_SERVER['HTTP_REFERER'] == 'http://example.com/') I'm not certain as to how effective and accurate $_SERVER['HTTP_REFERE'] is. I have tried using it for similar things in the past but without success, I found a free script to grab the URL and that has been working fine ever since. It is quite possible the frames are what are messing everything up. Link to comment https://forums.phpfreaks.com/topic/117118-my-code-and-drupal-and-ie7/#findComment-602415 Share on other sites More sharing options...
elhelaly1999 Posted July 29, 2008 Author Share Posted July 29, 2008 But when I remove the session it works fine on first page in IE7 but I need the session why it works on firfox and don't work on IE7 !!?? Link to comment https://forums.phpfreaks.com/topic/117118-my-code-and-drupal-and-ie7/#findComment-602538 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.