What is the potential issue with passing variables through the URL in PHP?

Passing variables through the URL in PHP can pose a security risk as it makes the data visible and easily manipulated by users. To solve this issue, it is recommended to use PHP's built-in function `htmlspecialchars()` to sanitize the input and prevent cross-site scripting attacks.

// Sanitize input from URL using htmlspecialchars
$variable = htmlspecialchars($_GET['variable']);