Re: Fw: [PHP] question about Location

From: Date: Fri, 06 Sep 2002 10:34:17 +0000
Subject: Re: Fw: [PHP] question about Location
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115431@lists.php.net to get a copy of this message
Put your code that takes care of the post before the line 2, output the header and exit. Like this <? if($_POST['submit']) {
      .... do what needs to be done
       header("Location: nextpage.php");
       exit;
} include "start_html.php" Meltem Demirkus wrote:
I tried , but it is giving this error: Warning: Cannot add header information - headers already sent by (output started at C:\FoxServ\www\debugger\project_module\project_update_.php:2) in C:\FoxServ\www\debugger\project_module\project_update_.php on line 37 the line 2 is <? include "start_html.php" ?> and start_html.php includes: <? include("defaults.php") ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <TITLE> <? echo $page_title ?></TITLE> <META http-equiv="Content-Type" content="text/html; charset=windows-1254"> </HEAD> <BODY> and line 37 is the header I wrote <? header("Location: yournewpage.php"); ?> ----- Original Message ----- From: "Marek Kilimajer" <kilimajer@webglobe.sk> To: "PHP" <php-general@lists.php.net> Sent: Friday, September 06, 2002 12:55 PM Subject: Re: [PHP] question about Location
<? ?> doesn't mean output unless you use echo or print or whatever to output from there anything. Just use header("Location: yournewpage.php"); at the end. Meltem Demirkus wrote:
I mean I made a page with php and other stuff..And there is form .When
       
I
click on okbutton php is dpoing what it should . But after want the
       
page
       
to
     
come to another link.I asked that before and they told me that .. there
       
must
     
be no uotput but I am using <?...?> which means output.. so I dont know what to do.. meltem ----- Original Message ----- From: "Brad Bonkoski" <bbonkosk@tampabay.rr.com> To: "Meltem Demirkus" <mdemirkus@momentum-dmt.com> Cc: <php-general@lists.php.net> Sent: Friday, September 06, 2002 12:36 PM Subject: Re: [PHP] question about Location
       
Not quite sure what you are getting at here? A hyper link would direct the user to another page :-) If you mean after a timeout/auto-magically perhaps you can try meta
         
refresh:
       
http://www.htmlhelp.com/reference/html40/head/meta.html HTH -Brad Meltem Demirkus wrote:
         
Is there anyway to direct my page to another after the php and output process work on the page? thanks meltem demirkus
           
         
     
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#115431) next »