special character in get request.

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
sharad2802
Forum Newbie
Posts: 2
Joined: Thu Oct 10, 2013 4:47 am

special character in get request.

Post by sharad2802 »

I want to my url to look like
locl.cms.com/upload/season.php?sid=20&currentPage=1

and this is my code:
echo'<form action="" method="get">

<button id="previouspage" name="'.$encodedURL.'" type="submit" value="'.$page.'">Previous Page</button>
<button id="nextpage" name="currentPage" type="submit" value="'.$pageN.'">Next Page</button>
</form>';
echo "Inside Div";
echo '</div>';
=========
where
$url='sid='.$sid.'&currentPage';
$encodedURL=urlencode($url);

when i click previouspage button , my url becomes locl.cms.com/upload/season.php?sid%253D20%2526currentPage=1
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: special character in get request.

Post by twinedev »

That is becasue you are running urlencode on the entire $url, where you need to just use it on the individual values.
Post Reply