Results 1 to 7 of 7

Thread: -[RESOLVED]- Header. Give me response.redirect anyday.. Can you turn me back?

Threaded View

  1. #1

    Thread Starter
    Addicted Member DigitalMyth's Avatar
    Join Date
    Nov 2002
    Location
    England..
    Posts
    169

    -[RESOLVED]- Header. Give me response.redirect anyday.. Can you turn me back?

    Code:
    <?php
       switch ($_GET["action"]) {
           case "auth":
    	   
    	        echo "you are at auth";
           
    	   break;
    	   
           case "sum": 
    	   
    	   	   echo "you are at sum";
           
    	   break;
    	   
           case "phpinfo": 
    	   
    	   	   phpinfo();
    	   
           break;
           default: 
    	   	   header( 'location:http://localhost:1987/php_dev/index.php?action=auth' );
    	   exit;
       }
    ?>
    Ok, heres the output.


    Notice: Undefined index: action in C:\Program Files\IIS\Inetpub\wwwroot\Site\php_dev\index.php on line 2

    Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\IIS\Inetpub\wwwroot\Site\php_dev\index.php:2) in C:\Program Files\IIS\Inetpub\wwwroot\Site\php_dev\index.php on line 21

    There is NOTHING outputting before the header so why is it complain.

    As you can tell i'm trying to transfer from asp.net to php because the servers are cheaper.

    So why is this header throwing a wobbly and what is the equal to response.redirect() of asp.net the one that you can redirect at ANY point in your script. PS. META tags are to messy.
    Last edited by DigitalMyth; Feb 15th, 2005 at 07:46 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width