the application sort of a shopping cart.
I load from an ajax source (any source would be the same xD) and unknown number of services (unknown cuz’ they grow in number in the database).
they are represented by a check-box which indicate if you want the service, then it displays 2 inputs one with the price disabled and the other to set quantity.
the problem is how do I send them all to php for process (total price calculation and database inserting). I have used the input attribute name with brackets for multiple selects
<select name="something[]">... ...</select>
I would like to know if there’s a way to achieve something like that, but with inputs.
or maybe some fancy jquery plug-in in the kind of mooitems.-
here is the page to see my total fail attempt 🙁
http://www.micontrol.cl/~mvargas/wordpress/wp-transatacama/reservas-rapidas/form-reservas-pal.php
(you first have to select a viaje then a categoria, the services associated will display now, and finally adjust the qtty of adultos to be able to submit the form… sorry that flow was a requiriment : /).
please help me out with some guidance, something to read, anything 😀
thx in advance.
Why not look at jquery serialize()?
http://api.jquery.com/serialize/
and then just iterate over $_POST[] or $_GET[] in your PHP depending on the method of your ajax call.
This may also be useful:
http://www.php.net/manual/en/reserved.variables.post.php#84813