Welcome Guest, Not a member yet? Register   Sign In
Submitting values of "jQuery Editable Invoice" into a MySQL DB
#2

[eluser]georgeedwards[/eluser]
Hey there not sure if you've already sorted this, but I've done something similar before.

I think I can see what you need to do. In my case, I named the HTML form elements with arrays. For example you could do in the view:

Code:
<form type="text" name="item[1][desc]" />
<form type="text" name="item[1][cost]" />

<form type="text" name="item[2][desc]" />
<form type="text" name="item[2][cost]" />

<form type="text" name="item[3][desc]" />
<form type="text" name="item[3][cost]" />

...

Then in your controller, you will receive multi-dimensional arrays of form data, so you can manipulate like the following:

Code:
foreach ($_POST['item'] as $item) {
     // Logic here...
     // $item['cost'] and $item['desc'] are accessible
}

Is this any help to you at all?

Post back if you need any more help, I may be able to help you with the Javascript side of things too (or at least I'll do my best!).

Cheers


Messages In This Thread
Submitting values of "jQuery Editable Invoice" into a MySQL DB - by El Forum - 08-25-2010, 10:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB