I want to my url to look like
locl.cms.com/upload/season.php?sid=20¤tPage=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.'¤tPage';
$encodedURL=urlencode($url);
when i click previouspage button , my url becomes locl.cms.com/upload/season.php?sid%253D20%2526currentPage=1
special character in get request.
Moderator: General Moderators
-
sharad2802
- Forum Newbie
- Posts: 2
- Joined: Thu Oct 10, 2013 4:47 am
Re: special character in get request.
That is becasue you are running urlencode on the entire $url, where you need to just use it on the individual values.