blinks Posted July 3, 2009 Share Posted July 3, 2009 There is a problem with the following line of my code - if (array_key_exists('evolveDark Charmeleon', $_POST)) All works well if I remove the space in "Dark Charmeleon", but with the space there, the "if" statement doesn't get processed. Any suggestions? I know the solution is something to do with escaping the string, but wrapping as per mysql_escape_string('evolveDark Charmeleon') doesn't work. TIA Quote Link to comment https://forums.phpfreaks.com/topic/164619-space-preventing-if-statement-being-processed/ Share on other sites More sharing options...
Philip Posted July 3, 2009 Share Posted July 3, 2009 It should automatically convert the space to an underscore.... at least with my tests it does. If you do a print_r($_POST); it will show the key name. Quote Link to comment https://forums.phpfreaks.com/topic/164619-space-preventing-if-statement-being-processed/#findComment-868182 Share on other sites More sharing options...
pkedpker Posted July 3, 2009 Share Posted July 3, 2009 making a pokemon site like me I see? owner of gpxplus here Quote Link to comment https://forums.phpfreaks.com/topic/164619-space-preventing-if-statement-being-processed/#findComment-868184 Share on other sites More sharing options...
blinks Posted July 3, 2009 Author Share Posted July 3, 2009 Thank you it works now. Quote Link to comment https://forums.phpfreaks.com/topic/164619-space-preventing-if-statement-being-processed/#findComment-868192 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.