Jump to content

How to use onchange in PHP or other ways?


sbabanli

Recommended Posts

Good morning to everybody!

I started to learn PHP forms and currently is doing registration form for users.

I did some all of them but some of them depends of value of other.

Could somebody them me how to use onchange properties?

I need on change of value in drop down list box to other some following checkboxes to be checked or unchecked.

 

My code is

 

<html>
<form>
Group number: <select name="groups">
<option>Please select 
<option>Group 1
<option>Group 2
<option>Group 3
</select><br>

<input type="checkbox" name="mushrooms" >mushrooms<br>
<input type=checkbox name="greenpeppers">green peppers<br>
<input type=checkbox name="olives"      >olives<br>
<input type=checkbox name="onions"      >onions<p>
<br>

</form>
</html>

 

I need code as if  list box value “Group 1” checkbox “mushrooms” and “green peppers” are checked

if  list box value “Group 2” other checkboxes checked as well.

Is it possible to use onchange properties in this.

Please help me in this code

Thanks in advance

Said Babanli

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.