Hi,
Below simple code is not working..
Please suggest??

<?php $userinput=24;?>
<a href="s.php?id=<?php  echo urlencode($userinput);  ?>">test</a>

URL encode is used to encode certain characters within a URL. It's not used to encode all characters and certainly isn't a means of encryption.

24 URL encoded is 24.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.