Re: Passing query parameter which has value "###"

From: Date: Mon, 08 Sep 2003 16:07:17 +0000
Subject: Re: Passing query parameter which has value "###"
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-161999@lists.php.net to get a copy of this message
Thanks for the reply.It is working -Murugesan ----- Original Message ----- From: "Chris Hayes" <chayes@antenna.nl> To: "murugesan" <mukeshgct@hotpop.com>; <php-general@lists.php.net> Sent: Monday, September 08, 2003 5:15 PM Subject: Re: [PHP] Passing query parameter which has value "###" > At 13:04 8-9-03, you wrote: > >I passed value > >main.php?name=$name&id=$id&id1=$id1 to next page > >where $id has value "###" > >In the next page I was not able to get the $id and $id1 values > >and I am able to get the two values $id1 and $name when I used > >main.php?name=$name&id1=$id1 > >What might be the problem? > > > The # in a url is used for the in-page anchors, e.g. if you have an anchor > in your page <a name="chapter2"></a>, then a url such as page.html#chapter2 > will jump to that location in the page. So the part after the # is cut off > by the browser, i suppose. > > > Try this: > <?php > echo '<a href="main.php?name='.$name.'&id='. > urlencode($id).'">'; > ?> > This changes the # to a code (% followed by some number) > > (check urlencode in the manual) >

« previous php.general (#161999) next »