Jump to content
Larry Ullman's Book Forums

Recommended Posts

I've used header() a hundred times. For some reason this just gives me a blank screen. The url exists and the script gets into the conditional and exits.

 

This is a modification of Larry's script in chapter 16 that I get get to work because of this.

 

thanks very much

    if (!isset($_SESSION['first_name']) || $_SESSION['user_level'] == 0 ) {
        echo "Hello, I should be redirecting now...";
        header('Location: https://tenthousandeyes.org/.php');
        exit(); // Quit the script.

    }
Link to comment
Share on other sites

Sorry, I copied it incorrectly. The code is as follows.

Also, I don't know what you mean when you say "print". Do you mean a php print statemet? What is the purpose of that?

	$url = 'index.php'; // Define the URL.
	echo "Hello, I should be redirecting now...";
	header('Location: https://tenthousandeyes.org');
	exit(); // Quit the script.
Link to comment
Share on other sites

 Share

×
×
  • Create New...