Announcements Last Post
Announcement : Programming Students at UNISA School of Computing 06/19/2019 02:01PM
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Making dropdown list data persist
October 17, 2013 06:13PM
Dear All,

I used a dropdown list to select the Mathematical operator for my calculator.
When I click the submit button, the 1st option appear and not the one that I selected.
How can I make what the user selected to show on the dropdownlist?

Your help wiil be humbly appreciated.

49912232 mbux
avatar Re: Making dropdown list data persist
October 17, 2013 08:55PM
On your form -

<select name="operator">
<option value="add">Add</option>
<option value="subtract">Subtract</option>
More options
</select>

PHP code -

if (isset($_POST[submit"])
{

$operator = $_POST['operator'];
}
Sorry, only registered users may post in this forum.

Click here to login