PHP Functions urlencode

posted by Scudyen date: Thursday, May 22, 2008 category: PHP

You should encode string values while passing  in an querystring. We use UrlEncode to Returns a string in which all non-alphanumeric characters except -_. have been replaced with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs.


Example :

<?php

   strString = "You drive me crazy";

   echo '<a href="page.php?msg=' . urlencode($strString) . '">Click Here</a>';

?>



Save this page as any name you've wished and call it using your favorite browser. Look at URL in adress bar. All querystring encoded by UrlEncode.

Happy Coding

Read More

Custom Search



Gazatem Technologies Active News Manager


page counter

Listed with 411asp.net Listed with 4aspin.com