[PHP] header problems
Hi All I need to display a javascript window with some text displayed in to. After the execution and displaying of this windows, I have two executable php script that perform some task for me. After all this I need the page to direct to another page. I keep getting this header error. If someone know of a solution, that would be most appreciated Here is my code: if($read){ require_once('lib/functions.inc'); {execute the javascript window here} exec(/var/www/html/ag.php); exec(/var/www/html/convert_tif2pdf.php); header(Location: capture.php); exit; } Kind Regards and thank you Brent Clark
RE: [PHP] header problems
[snip] I keep getting this header error. [/snip] Which header error? Like, the one where it says you can't do it again? It is because you have caused some output somewhere prior to the invocation of you header request to the new location. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] header problems
From: Brent Clark [EMAIL PROTECTED] I need to display a javascript window with some text displayed in to. After the execution and displaying of this windows, I have two executable php script that perform some task for me. After all this I need the page to direct to another page. Use a Javascript redirect, since displaying your javascript window is output to the browser and you can't use header() redirection after there's been output. Or rethink your logic. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] header problems
Hi all, Can anyone tell me if there is any reason why this would not be working? mysql_connect($DBhost,$DBuser,$DBpass) or die(header(Location: error.php)); What im trying to do is connect to the database and if that fails send the browser to the error page. But the browser just sits there on the page that fails to connect Thanks for any advice/help in advance Cheers From baldey_uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] header problems
Can anyone tell me if there is any reason why this would not be working? mysql_connect($DBhost,$DBuser,$DBpass) or die(header(Location: error.php)); Why bother calling die() at all there? ? if ($mysql != mysql_connect($DBhost,$DBuser,$DBpass)) { Header(Location: error.php); Exit(); } ? J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Header problems
Help, Why did this suddenly stop working? (only code on page) script language="php" header ("Location: http://www.otherserver.com/index2.htm"); /script It was working fine before, now the page just returns: /body/html in the source, no error messages.
[PHP] header problems
when i put this header('location: $url'); i get this http://domain.com/$url what the hell am i doing wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] header problems
Kurth Bemis wrote: when i put this header('location: $url'); i get this http://domain.com/$url what the hell am i doing wrong? erm, header ("Location: $url"); [double quotes, so PHP will consider your dollars, yens or whatever] --teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]