0

Hello! Please I would want to be able allow users select options from a list of selections as many times as possible using php, how do i achieve that? Below is a form for better description of what i desire to do

<html><body>
<form action="" method="post">
<p>You can enter your subjects as many times as possible</p>
<select>
<option>English</option>
<option>Mathematics</option>
<option>Physics</option>
<option>Chemistry</option>
<option>Biology</option>
</select>
<select>
<option>A</option>
<option>B</option>
<option>C</option>
</select>
<select>
<option>2012</option>
<option>2011</option>
<option>2010</option>
</select>

<Input type="button" value="enter">
</form>
</body>
</html>

--------------------end
Supposing the user want to enter 5 subjects with their respective grades and year, how do you make the html and php do this jointly or would one require Javascript to do this? Please I need your assistance!

----->

Edited by Dani: Formatting fixed

2
Contributors
2
Replies
17
Views
2 Years
Discussion Span
Last Post by erabxes
0

Yes you need javascript.
Your best bet (IMO) is to output form fields to rows in a table. Then you can press a big Update button to update a DB via PHP - either through normal form submission or via ajax.

You may find an editable table easier, where a cell can be turned into a dropdown or a textbox on click. And you could add new editable rows too. This is not a trivial bit of coding though, but not that difficult either. However, Daniweb is not a free coding service. Have a search for some scripts, have a play and come back to us with questions or problems.

0

Thanks Diafol. Your assistance is greatly appreciated! Will be hoping to hear again from you incase i have any question.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.