But I only want it to insert if the page was all lowercase when they went to it. I understand it continuing after redirecting, but why after die()ing too? Putting the insert code into an else statment solved the problem, but it's ugly, and the question still remains... why does it do this?

Jason Wong wrote:

On Saturday 04 January 2003 11:00, Leif K-Brooks wrote:

But it shouldn't get to the database insert because of the redirect
either... I only added the die; when it still inserted with the redirect.

As you have already found out, the code _does_ continue to execute after the header() redirect.

Try this:

if (not_lowercase) {
insert_into_db();
header();
die();
}


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.


Reply via email to