i have a problem with this homepage.
I have to create a Site like this:
status create work finished
Item1 * o o
Item2 o * o
Item3 o o *
(* = checked, o = unchecked)
Now as admin i have the rights to change the status of the each Item.
For example when i change the Status from Item1 to “work” it should send a Form and update it in Database.
My Problem is know, should i create for each pair of 3 radiobuttons 1 Form?
But when i create 1 for all Buttons i will have problems to know which status have changed.
Only compare with each Database entry.
Before someone ask, i should use radiobuttons.
Hope someone could help.
Greetz
Demonking
Edit: Sorry, eomeone have misunderstand me.
I meant if i would be faster and better with :
<form method="post">
Item 1 <input type="radio" name="item1" value="create" onclick="this.form.submit()"/>
<input type="radio" name="item1" value="work" onclick="this.form.submit()"/>
<input type="radio" name="item1" value="finished" onclick="this.form.submit()"/>
</form>
<form method="post">
Item 2 <input type="radio" name="item2" value="create" onclick="this.form.submit()"/>
<input type="radio" name="item2" value="work" onclick="this.form.submit()"/>
<input type="radio" name="item2" value="finished" onclick="this.form.submit()"/>
</form>
or
<form method="post">
Item 1 <input type="radio" name="item1" value="create" onclick="this.form.submit()"/>
<input type="radio" name="item1" value="work" onclick="this.form.submit()"/>
<input type="radio" name="item1" value="finished" onclick="this.form.submit()"/>
Item 2 <input type="radio" name="item2" value="create" onclick="this.form.submit()"/>
<input type="radio" name="item2" value="work" onclick="this.form.submit()"/>
<input type="radio" name="item2" value="finished" onclick="this.form.submit()"/>
</form>
because of Performance with PHP/MySQL
I’d probably use one form and then perform a database update for all values.
And then I’d use javascript to augment the page, i.e. keep it working for clients that don’t support/execute javascript but have a submit-handler that only sends values that have changed in clients that do execute javascript.
And then I’d do some benchmarking/profiling to check if the “only changed values” versionn really is faster/better than the “update all values” version. If not the javascript part is history 😉