simora Posted July 11, 2009 Share Posted July 11, 2009 Can anyone please tell me why this is not re-directing? I have checked the 'sviews' with other code and it is set correctly. It should give either its NOT OK or redirect. Its doing neither. <?php if(isset($_SESSION['sviews'])) { header(“Location: http://www.AOL.com”); } else { echo " its NOT OK"; } ?> Code or suggestions welcome. Thanks Link to comment https://forums.phpfreaks.com/topic/165582-solved-php-header-not-re-directing/ Share on other sites More sharing options...
trq Posted July 11, 2009 Share Posted July 11, 2009 Your using some strange quote characters. Link to comment https://forums.phpfreaks.com/topic/165582-solved-php-header-not-re-directing/#findComment-873401 Share on other sites More sharing options...
simora Posted July 11, 2009 Author Share Posted July 11, 2009 RE: strange quote characters. Like What? I've tried single quotes etc.. Can you help? Link to comment https://forums.phpfreaks.com/topic/165582-solved-php-header-not-re-directing/#findComment-873403 Share on other sites More sharing options...
trq Posted July 11, 2009 Share Posted July 11, 2009 Look at your code.... this header(“Location: http://www.AOL.com”); should be... header("Location: http://www.AOL.com"); If that still doesn't work for you, make sure you have error reporting and display errors switched on (you should always have these two settings working when devloping anyway). error_reporting(E_ALL); ini_set('display_errors','1'); Link to comment https://forums.phpfreaks.com/topic/165582-solved-php-header-not-re-directing/#findComment-873406 Share on other sites More sharing options...
haku Posted July 11, 2009 Share Posted July 11, 2009 Did you type that up in word or something? You don't want smart quotes for this. Link to comment https://forums.phpfreaks.com/topic/165582-solved-php-header-not-re-directing/#findComment-873447 Share on other sites More sharing options...
simora Posted July 12, 2009 Author Share Posted July 12, 2009 Thanks a million. I'm not sure where those special " " came from. I had to look at them in Ms Word @ 400% That was the problem. Now it works. Link to comment https://forums.phpfreaks.com/topic/165582-solved-php-header-not-re-directing/#findComment-873839 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.