Hello all, I need ur help in below work, I used header to redirect browser with two variables like below: header('location:addpageconetent.php?mcid='.$mcid.'&scid='.$scid.'&page=success'); PHP: The rediection is works good. But when i refresh page again %20 is added in the url everytime. like below; http://localhost/sylvania/admin/addpageconetent.php?mcid=1&scid=%2019&page=success PHP: It causes some problem. Please help me about how to avoid this % symbol when page refresh.
%20 is a space. Check your variable $scid for any spaces, cause if you pasted the code directly, this is your problem - you have a space at the beginning of $scid. If you wanna make sure there are no spaces in the var you can do something like this: $scid = str_replace(' ', '', $scid); PHP:
header('location:addpageconetent.php?mcid='.urlencode($mcid).'&scid='.urlencode($scid).'&page=success'); PHP: