View difference between Paste ID: gYA1GpG4 and gR6fufDw
SHOW: | | - or go back to the newest paste.
1
/* Parameter URL values */
2
$name = 'param1';
3
$surname = 'param2';
4
5
/* Sanitized URL parameter values */
6
$nameSanitized = urlencode($name);
7
$surnameSanitized = urlencode($surname);
8
9
/* URL string */
10
$url = 'http://yoursite.com?name=' . $nameSanitized . '&surname=' . $surnameSanitized;
11
12
/* URL string sanitized for HTML */
13
$urlHTML = htmlentities($url, ENT_QUOTES | ENT_HTML5, 'UTF-8');
14
15
echo '<a href="' . $urlHTML . '">';