webprog Posted July 7, 2015 Share Posted July 7, 2015 I have a form in admin panel which generate (with help of the javascript) text fields with names like: var1, var2, var3 ... var10...var45 and so on. How can I take these dynamic POST data from form without prohibition of validator. public static function getValue($key, $default_value = false) - is for known variable names only. Link to comment Share on other sites More sharing options...
webprog Posted July 7, 2015 Author Share Posted July 7, 2015 It is simple: Using arrays var[] Link to comment Share on other sites More sharing options...
vekia Posted July 7, 2015 Share Posted July 7, 2015 that's right something like <input type="text" name="myName[]" /> <input type="text" name="myName[]" /> <input type="text" name="myName[]" /> <input type="text" name="myName[]" /> <input type="text" name="myName[]" /> <input type="text" name="myName[]" /> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now