Page 1 of 1

special character in get request.

Posted: Thu Oct 10, 2013 4:54 am
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

Re: special character in get request.

Posted: Thu Oct 10, 2013 8:30 am
by twinedev
That is becasue you are running urlencode on the entire $url, where you need to just use it on the individual values.