thescientist Posted September 29, 2011 Share Posted September 29, 2011 So, I've run into a slightly interesting problem in the course of this work project. For some reason certain parts of a string aren't showing up when passed from a form via POST to a script which is handling some of the validation. For some reason, when I dump $_REQUEST, I can see the POST field there, and normally everything is fine. The case is if the user uses autocomplete, the address will be input into the form as Some Person <sperson@something.net> //name : EmailTo however, a dump of $_REQUEST reveals this for EmailToarray(13) { ["command"]=> string(8) "sendmail" ["random"]=> string(10) "1317318346" ["unique"]=> string(0) "" ["id"]=> string(26) "gtf3pq9mu0jbqqt0nl6liq6tg0" ["folder"]=> string(5) "Inbox" ["action"]=> string(4) "save" ["msgid"]=> string(0) "" ["searchParams"]=> string(0) "" ["EmailTo"]=> string(35) "Some Person " ["EmailCC"]=> string(0) "" ["EmailBCC"]=> string(0) "" ["EmailSubject"]=> string(0) "" ["Message"]=> string(0) "" } for some reason everything between the <> doesn't show up, which is what i need to be able to validate against (although it appears they are all accounted for. ["EmailTo"]=> string(35) "Some Person "Using someone@website.com works fine. If I do <hello>, then I getarray(13) { ["command"]=> string(8) "sendmail" ["random"]=> string(10) "1317318179" ["unique"]=> string(0) "" ["id"]=> string(26) "gtf3pq9mu0jbqqt0nl6liq6tg0" ["folder"]=> string(5) "Inbox" ["action"]=> string(4) "save" ["msgid"]=> string(0) "" ["searchParams"]=> string(0) "" ["EmailTo"]=> string(7) "" ["EmailCC"]=> string(0) "" ["EmailBCC"]=> string(0) "" ["EmailSubject"]=> string(0) "" ["Message"]=> string(0) "" } and we see nothing, but var dump tells is the string is 7 characters long. so where did they go? As far as I know no extra parsing is happening, but I just wanted to make sure I wasn't missing something super obvious first. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 29, 2011 Share Posted September 29, 2011 If you're looking at that output in the browser, it's going to assume anything between < and > is an HTML tag. Check the source of the page instead. Link to comment Share on other sites More sharing options...
thescientist Posted September 29, 2011 Author Share Posted September 29, 2011 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.