Hello
In my website I have a php page to receive data from get method from ajax file - then send a mail with all the data received by get method - but its not working - the problem is when I send an email address(test@test.com) from get method its not working when I remove @ or dot(.) it works. my working page is (either @ or dot(.) is missing):
process.php?name=name&email=test@test&phone=123123&details=test
process.php?name=name&email=test@test&phone=123123&details=test
not working page
process.php?name=name&email=test@test.com&phone=123123&details=test
is not working because @ and dot(.) both are present at same time and i am receiving the data with $_GET
please help
Thanks in advance
$_get problem
Moderator: General Moderators
-
dimxasnewfrozen
- Forum Commoner
- Posts: 84
- Joined: Fri Oct 30, 2009 1:21 pm
Re: $_get problem
It's not really a PHP problem.
You will have to escape those characters in your javascript file where it's doing the AJAX call.
You will have to escape those characters in your javascript file where it's doing the AJAX call.
Re: $_get problem
You need to URL encode the email address.
[text]test%40test.com[/text]
[text]test%40test.com[/text]
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: $_get problem
encodeURIComponent()
or
encodeURI()
or
encodeURI()
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.