rizla_za Posted February 4, 2009 Share Posted February 4, 2009 Hi guys I was just wondering if there is a way that one can determine if certain variables was passed via a hidden field. Maybe using an if statement? This is my problem. I have about 200 pages with different forms posting to one page. So to make things easier I use a foreach ($_POST as $key => $val) loop to echo the values on the page, but I don’t want to echo the values of the hidden fields. There are to many hidden fields with different names to write an if statement for them all. Any suggestions? Thanks!! Link to comment https://forums.phpfreaks.com/topic/143738-hidden-field/ Share on other sites More sharing options...
peranha Posted February 4, 2009 Share Posted February 4, 2009 why not name them all the same, and set them to a different value? get the value of it, and then you will know where it came from. Link to comment https://forums.phpfreaks.com/topic/143738-hidden-field/#findComment-754168 Share on other sites More sharing options...
rizla_za Posted February 4, 2009 Author Share Posted February 4, 2009 There are over 300 different hidden fields, I cant rename them the same name and yes I can write 300+ if statments to exclude them all in the echo. I was just wondering if there was an faster way. Link to comment https://forums.phpfreaks.com/topic/143738-hidden-field/#findComment-754173 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.