php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #20171 Please make a command that redirects to another page not using header("Location
Submitted: 2002-10-30 08:50 UTC Modified: 2002-10-30 09:01 UTC
From: hallstein at yahoo dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.2.3 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hallstein at yahoo dot com
New email:
PHP Version: OS:

 

 [2002-10-30 08:50 UTC] hallstein at yahoo dot com
Please make a command that redirects a user in the middle of code. Similar to the Response.Redirect on ASP.

Why? Because header("Location:") cannot redirect unless it's BEFORE the <html> tag. And I want the following:

<html>

Making new DATABASE record..<br>
<? SQL code goes here...
   INSERT INTO ...

   If error die( redirect("error.html") );
   else redirect("index.html") );
?>


Would be nice with a wait (seconds) command too, so we are sure that the user get some time to see the result, before being redirected.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-30 08:59 UTC] hholzgra@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.
 [2002-10-30 09:01 UTC] hholzgra@php.net
hint: http://php.net/outcontrol

> Would be nice with a wait (seconds) command too, so we are sure that the
> user get some time to see the result, before being redirected.

or use meta tags instead of headers ...

not really a php issue at all.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Jan 11 07:00:01 2026 UTC