$_get problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zoyid55
Forum Newbie
Posts: 1
Joined: Mon Jun 28, 2010 6:01 am

$_get problem

Post by zoyid55 »

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
dimxasnewfrozen
Forum Commoner
Posts: 84
Joined: Fri Oct 30, 2009 1:21 pm

Re: $_get problem

Post by dimxasnewfrozen »

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.
User avatar
timWebUK
Forum Contributor
Posts: 239
Joined: Thu Oct 29, 2009 6:48 am
Location: UK

Re: $_get problem

Post by timWebUK »

You need to URL encode the email address.

[text]test%40test.com[/text]
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: $_get problem

Post by AbraCadaver »

encodeURIComponent()
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.
Post Reply