Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Server-side Scripting _ help html/php (absolute beginner)

Posted by: nicotier Apr 21 2017, 07:37 AM

hello, i need help for a website

how can i make appear another dropdown menu if i choose for example "master" in the first dropdown menu

<form class="form-horizontal row-top-margin" action="training.php" method="post">
<fieldset>

<div class="form-group">
<label for="degree" class="col-sm-2 control-label">DiplĂ´me</label>
<div class="col-sm-10">
<select class="form-control" name="degree">
<option value="none">Aucun</option>
<option value="baccalaureate">Baccalauréat</option>
<option value="bachelor">Bachelor</option>
<option value="masters">Masters</option>
<option value="phd">PhD</option>
<option value="other">Autre</option>
</select>
</div>
</div>

Posted by: Christian J Apr 21 2017, 10:12 AM

When the form is submitted, the PHP script in training.php could check if the "masters" value was submitted, and if so create a new HTML page with the other dropdown menu.

For the basics of PHP forms, see http://php.net/manual/en/tutorial.forms.php

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)