I have a bit of code which checks 2 $_GET variables with preg_match. It also looks up one variable value in the database. The problem is that the email address which is url encoded and the @ symbol is replaced with %40 is not turned back into readable text when I call the variable.
So if I call $_GET['email'] the value displayed is someone%40example.com while it should be someone@example.com
I understand $_GET variables get decoded automatically but it is not working for me. This problem came with the installation of SSL on this domain. Could it have something to do with that?
Here's my code:
if (isset($_GET['Email']) && preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/', $_GET['Email'])) {
$Email = $_GET['Email'];
}