AjayR
AjayR

Reputation: 4179

Querystring manipulation of email Address in PHP

I am using some third party application (email2http) which will send me emailID, body and message. I unable to retrieve the email ID properly due to my name is appended on it and enclosed with < and >. Here is the querystring I am getting.

test.php?from=Ajay+Reddy &subject=cx&body=somebody

When I print the from variable in PHP it just returns the name and not email ID.

$from = $_GET['from']; echo $from;

//output Ajay Reddy

Please suggest me how can I get the emailID also.

I dont want to use post method due to my testing and debugging.

Upvotes: 0

Views: 339

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799310

It's working fine. You forgot to use htmlentities() in your debugging.

Upvotes: 1

Related Questions