Re: [PHP] how to redirect ?
CBharadwaj wrote: Hi I have used Header (Location:PATH) function for redirection. it is giving some errors. is there any other method other than HEADER() funtion for redirecting ? Bharadwaj What type of errors have you? Heber D'Alberto -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to redirect ?
What errors is it giving? It should work fine. However, remember that since it is part of the HTTP header information it has to come before any of the main output of the script. Do you have a code sample and the error message? Abdul-Wahid On Fri, 13 Aug 2004 16:03:29 -0700, CBharadwaj [EMAIL PROTECTED] wrote: Hi I have used Header (Location:PATH) function for redirection. it is giving some errors. is there any other method other than HEADER() funtion for redirecting ? Bharadwaj -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to redirect ?
CBharadwaj wrote: Hi I have used Header (Location:PATH) function for redirection. it is giving some errors. is there any other method other than HEADER() funtion for redirecting ? Bharadwaj What are the errors? Output already started? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to redirect with post method
Ral Castro wrote: Hello, I have a webpage that I'm redirecting to other page with header command, for instance: header(location:information.php?cod1=$cod1cod2=$cod2...codn=$codn); I need send all vars (cod1, cod2, ..codn) on POST method, How Can I do this? thanks. Easy way, JavaScript. More involved way, Sockets -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to redirect with post method
Ral Castro wrote: Hello, I have a webpage that I'm redirecting to other page with header command, for instance: header(location:information.php?cod1=$cod1cod2=$cod2...codn=$codn); I need send all vars (cod1, cod2, ..codn) on POST method, How Can I do this? thanks. In fact if you redirect from a page that accepts POST data, the POST data will not be carried along to the next page. That's probably why John suggested you look at sockets. All in all it's very rarely that you need to accept post data and then redirect, most of the time you can either include another script in your main script or do with the data if there's no alternative other than to redirect. -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to redirect with post method
I don't believe you can sent those post variables on the URL. Either as GET variables on the URL. Set Session variables and read on the next page. Or setup a FORM with hidden post variables populated with the $post variables, and JavaScript to auot submit onload. Hello, I have a webpage that I'm redirecting to other page with header command, for instance: header(location:information.php?cod1=$cod1cod2=$cod2...codn=$codn); I need send all vars (cod1, cod2, ..codn) on POST method, How Can I do this? thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to redirect form results to different server?
Jody, on frommail.php: Depending on your version of PHP I would guess you are running PHP 4.2 or greater with register_globals = off. That would create the errors that you are getting: Notice: Undefined variable: Name To get around this error Use this $_GET[Name] this should return the value of name. For your form_results.php You need to do 2 things. 1.) when you reroute from formmail.php to form_results.php you need to include your variable values in the URL string like so. header(Location: http://www.winnefox.org/ form_results.php?Name=urlencode($Name)Add=urlencode($Add)); encodes spaces and special characters for transfer over a URL. http://www.php.net/manual/en/function.urlencode.php Then on your form_results.php page to get the variable type this $Name = urldecode($_GET[Name]); http://www.php.net/manual/en/function.urldecode.php That should enable you to do what you where wanting to do. Jonathan Pitcher On Thursday, March 6, 2003, at 11:30 AM, Jody Cleveland wrote: Hello, I've got a form here: http://www.winnefox.org/ccbc.html Which I have running this: form method=get action=http://email.winnefox.org/wals/support/formmail.php; In that form, I also have it redirect the results to: http://www.winnefox.org/form_results.php What I get when I submit the form is this: Notice: Undefined variable: Name (there's one for each line) On that results page, I have this: ?php echo bYour Name:/b $Name br /; ? Any ideas as to what the problem may be? is it possible to make that round trip and have submitted info carry form one server to the other? -- Jody Cleveland ([EMAIL PROTECTED]) Winnefox Library System Computer Support Specialist -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how to redirect from one page to an other page in PHP ?
I think this is what you'll want. switch (condition1) { case 1; header(Location: page1.php); case 2; header(Location: page2.php); } You need to be careful that you haven't output anything beforehand or you'll get an error message. Even having a blank line before the ?PHP tag will screw you up. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to redirect to other page?
On Mon, 5 Mar 2001, JW wrote: i have used header to redirect to other page. [cut] if ($result == false) { header ("HTTP/1.0 404 Not Found"); exit; } else { header ("../Form/first.html"); ^ According to RFC, you should use: header('302 Moved'); header('Location: http://new.location.com'); Greets, Batonik -- 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]