Zinger Posted April 11, 2009 Share Posted April 11, 2009 I'm posting from a form that has a <select> element in it. For some odd reason, the name of the select is posted with an added backslash ("\"). For example: <select name=field_id_lov_1"> will be posted as "field_id_lov_1\". At least this is what I'm seeing in the PHPEd debugger when I highlight the $_POST variable in my code. Trying to access the field using $_POST['field_id_lov_1'] returns null. Does anybody have any ideas? There are other elements (none of them selects) defined on the form and their names all post properly. Quote Link to comment https://forums.phpfreaks.com/topic/153583-posted-field-name-has-added-backslash-on-it/ Share on other sites More sharing options...
Kieran Menor Posted April 11, 2009 Share Posted April 11, 2009 Assuming you copied that directly from your source code, might it be because of the lack of a beginning double-quote? Quote Link to comment https://forums.phpfreaks.com/topic/153583-posted-field-name-has-added-backslash-on-it/#findComment-807025 Share on other sites More sharing options...
Zinger Posted April 11, 2009 Author Share Posted April 11, 2009 Assuming you copied that directly from your source code, might it be because of the lack of a beginning double-quote? You nailed it. I actually found this error right after I posted and I came back to post so, but good catch. Quote Link to comment https://forums.phpfreaks.com/topic/153583-posted-field-name-has-added-backslash-on-it/#findComment-807026 Share on other sites More sharing options...
iarp Posted April 11, 2009 Share Posted April 11, 2009 I think there should or (or already is) a law named for these situations. As soon as i'll paste some troublesome code to a friend over IM.... i'll figure out wtf's wrong as soon as i hit enter. Quote Link to comment https://forums.phpfreaks.com/topic/153583-posted-field-name-has-added-backslash-on-it/#findComment-807030 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.