scrubbicus Posted June 9, 2009 Share Posted June 9, 2009 It won't let me grab the value I'm trying to grab $_POST['email'] in this instance but I'm using a dynamic form that passes the key that was edited through $_POST['key'] which I do $key = $_POST['key'] (so now if email was edited $key = 'email' and then the value comes through $_POST['whatever value it was'] which I try to catch like this $value = $_POST[$key] but it says that index 'email' does not exist. but I can do this $value = $_POST['email'] and I can echo $key. so both of those are valid but the whole $_POST[$key] doesn't work. any help is apprecieated thanks. Quote Link to comment https://forums.phpfreaks.com/topic/161586-_postvalue-not-working/ Share on other sites More sharing options...
steveangelis Posted June 9, 2009 Share Posted June 9, 2009 Can you show us the code? Quote Link to comment https://forums.phpfreaks.com/topic/161586-_postvalue-not-working/#findComment-852670 Share on other sites More sharing options...
madspof Posted June 9, 2009 Share Posted June 9, 2009 erm im not sure which bit of code to show so could you just tell me how you pass a variable from the php file calling the php class to the actualy php class being used ? Quote Link to comment https://forums.phpfreaks.com/topic/161586-_postvalue-not-working/#findComment-852679 Share on other sites More sharing options...
Maq Posted June 10, 2009 Share Posted June 10, 2009 It won't let me grab the value I'm trying to grab $_POST['email'] in this instance but I'm using a dynamic form that passes the key that was edited through $_POST['key'] which I do $key = $_POST['key'] (so now if email was edited $key = 'email' and then the value comes through $_POST['whatever value it was'] which I try to catch like this $value = $_POST[$key] but it says that index 'email' does not exist. but I can do this $value = $_POST['email'] and I can echo $key. so both of those are valid but the whole $_POST[$key] doesn't work. any help is apprecieated thanks. Huh? Quote Link to comment https://forums.phpfreaks.com/topic/161586-_postvalue-not-working/#findComment-852873 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.