Jump to content

[SOLVED] PHP header not re-directing


simora

Recommended Posts

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

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');

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.