Re: [PHP] Finding the? in $REQUEST_URI?page=blah

2001-02-17 Thread Christian Reiniger
On Friday 16 February 2001 23:57, James, Yz wrote: OK, I've an error handling page. Basically, I want to split (that might even be one of the functions I'll have to use) this sort of url: error.php?/pages/login.php?username=name That will only cause trouble. URLs with parameters have the

RE: [PHP] Finding the? in $REQUEST_URI?page=blah

2001-02-16 Thread Javier Muniz
An exceptionally easy way to do this would be to pass both $PHP_SELF and $REQUEST_URI. Alternatively, you can use explode(): ?php $array = explode('?',$REQUEST_URI); ? form method="post" action=?php echo $array[0] ?" Username: input type="text" name="username"r etc/form -Original

Re: [PHP] Finding the? in $REQUEST_URI?page=blah

2001-02-16 Thread ..s.c.o.t.t.. [gts]
i'd use split, to split the value up into an array: if this is your url $url = "/pages/error.php?/pages/login.php?user=scott"; and use this code: $thing = split('\?', $url); print $thing[0] ." BR\n "; print $thing[1] ." BR\n "; print $thing[2] ." BR\n "; output will be:

Re: [PHP] Finding the? in $REQUEST_URI?page=blah

2001-02-16 Thread John Monfort
Is the PHP split command the same as that in Perl? ex. ($var_1, $var_2) = split(/:/,$string, 2); will something like that work? On Fri, 16 Feb 2001, ..s.c.o.t.t.. [gts] wrote: i'd use split, to split the value up into an array: if this is your url $url =

RE: [PHP] Finding the? in $REQUEST_URI?page=blah

2001-02-16 Thread ..s.c.o.t.t..
IL PROTECTED]] Sent: Friday, February 16, 2001 16:57 To: ..s.c.o.t.t.. [gts] Cc: php-general Subject: Re: [PHP] Finding the? in $REQUEST_URI?page=blah Is the PHP split command the same as that in Perl? ex. ($var_1, $var_2) = split(/:/,$string, 2); will some