473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Call exit() after header location call?

Does anyone know if you need to call exit() after every call to header('location...')? I have found that on some forms that call themselves and redirect depending on POST data, I have had to add the exit() call.

Any thoughts?
Mar 6 '08 #1
3 2321
dlite922
1,584 Expert 1GB
Does anyone know if you need to call exit() after every call to header('location...')? I have found that on some forms that call themselves and redirect depending on POST data, I have had to add the exit() call.

Any thoughts?
I've never called the exit after my header changes.

worked like a charm.
Mar 6 '08 #2
ronverdonk
4,258 Expert 4TB
After you call header() your script still continues processing, so an exit() is appriopriate to halt procesing the currrent script.

ronald
Mar 7 '08 #3
dlite922
1,584 Expert 1GB
After you call header() your script still continues processing, so an exit() is appriopriate to halt procesing the currrent script.

ronald
I'll shut up. =X

But thanks though. When it works, doesn't mean it's the right way necessarily.
Mar 7 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: James Leddy | last post by:
For some reason, I get a segmentation fault when I exit this program I made. Most of the time when I have seen this it has occured in the middle of the program and the program terminates. However,...
7
by: Duff B | last post by:
Hi, this code perfectly works when I try to force the download of a file, by calling it directly. <?php $file = "onefilename.txt"; if (!is_file($file)) { die("<b>404 File not...
6
by: G*rd*n | last post by:
I have been using the HTTP "Location" reponse header to direct a symbolic request to a CGI program to an actual URL/file. For example, let us suppose the CGI program's table indicates xyz ->...
16
by: a | last post by:
Hi everybody, My config: Win XP (or 2003), Apache 2.0.54, PHP 5.1.2. I have been trying to handle the case of a lenghty opearation on the server while providing the user with feedback and...
18
by: AlexanderVX | last post by:
How do I write a constructor mehtod call in this case /*-----------*/ template<typename Tclass CObjectPoolImpl { public: void smth(T* pObj) { if (pObj)
11
by: yangsuli | last post by:
i want to creat a link when somebody click the link the php script calls a function,then display itself :) i have tried <a href=<? funtion(); echo=$_server ?>text</a> but it will call the...
2
by: salvadorvp | last post by:
Hi, I have the following code that gives me this odd error message at a line of code inside the PEAR libraries: "Fatal error: Call to undefined function: MDB2_Driver_mssql::getMessage(). in...
0
by: mix01 | last post by:
Hi, I am trying to get some VBA code working, but am preplex as to why it does not work. I would really appreciate any level of help. Many thanks, Mix01 Version of the program
3
by: Tim Roberts | last post by:
JRough <jlrough@yahoo.comwrote: More than the syntax problems, you also have a logic problem here. How do you think that "if" statement is ever going to be hit, given the statement immediately...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.