urlencode: encoding data before sending through URLWhile sending data through URL or through address bar we can't send them as it is. We need to encode the data to take care some special chars if present inside our data string. Let us try with one example.
Here is a string to send through URL to another page.
$var=" data 1 & data 2, data 1 + data 2 = data '3. The number is #123 which is 10% of total";
After sending like this we won't receive the same data and it will be truncated from & char onwards. Let us create two PHP pages and to pass one string data from one to other.