sbabanli Posted March 31, 2009 Share Posted March 31, 2009 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 Link to comment https://forums.phpfreaks.com/topic/151879-how-to-use-onchange-in-php-or-other-ways/ Share on other sites More sharing options...
trq Posted March 31, 2009 Share Posted March 31, 2009 Firstly, this is the 'PHP Math' section, secondly, onchange is a client-side event and as such needs to call a client-side script eg; Javascript. Link to comment https://forums.phpfreaks.com/topic/151879-how-to-use-onchange-in-php-or-other-ways/#findComment-797668 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.