Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Parameter URL values */
- $name = 'param1';
- $surname = 'param2';
- /* Sanitized URL parameter values */
- $nameSanitized = urlencode($name);
- $surnameSanitized = urlencode($surname);
- /* URL string */
- $url = 'http://yoursite.com?name=' . $nameSanitized . '&surname=' . $surnameSanitized;
- /* URL string sanitized for HTML */
- $urlHTML = htmlentities($url, ENT_QUOTES | ENT_HTML5, 'UTF-8');
- echo '<a href="' . $urlHTML . '">';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement