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!! Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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.