Hy guys I am trying to add two check boxes to each form result alright… In total form has 50 results…
How can I get an array with all 3 parameters per each result on form post?
Each result html:
<div style="float: left;margin-right: 10px;">
delete: <input type="checkbox" name="parameter" value="delete">
approve: <input type="checkbox" name="parameter" value="approve">
<input type="hidden" name="parameter[userid]" value="1">
Sounds like you are asking for some server side code or php function rather than html/css?
If you can clarify the question a little it might help to find the right category for the question as html and css have nothing to do with arrays as such.
If it was a layout question then fire ahead ( also don’t forget your associated labels as checkboxes without labels are hard to hit).
I have a moderation page that shows 50 results.
Now id like to add to each result two options approve or delete.
Plus hidden value of userId.
On post grab from each result all those 3 options and pass then in array to php for processing.
OK folks looks like Im gonna use this
Then that would be a PHP question so not sure why you posted in html and CSS
Do you want me to move this thread to PHP or perhaps JS or are you sorted now?
As PaulOB said, this is more of a PHP question. The form you’ve displayed is only part of the story.
Where is the PHP that your using to post this form to the database? Is it in the head of the file or in a separate file?
Well, not exactly like that, surely? A numeric index would be easier to code.
... and so on
Or use whatever unique index that the 50 options have in the database table, if they’re coming from one.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.