Posts

Showing posts with the label Selectbox with PHP Mysql

Make Check Box And Selected Option Checked in PHP

Make multiple check box and selected option checked in php according database value. Make Selectbox checked :- SQL Query :- $GetCuisines = mysqli_query($obj->mysqli,"SELECT CuisineID,CuisineName,CuisinePic from contribu_yummy.cuisine where active=1 and deleted=0"); <select name="SelCuisineID" id="SelCuisineID" class="form-control" style="width:230px">     <option value="" class="Text" >Select</option>     <?php     while($cuisineRow = mysqli_fetch_array($GetCuisines))     {         if($CuisineID == $cuisineRow['CuisineID'])         {             $checkedCuisine = "selected='selected'";         }         else         {          ...

Change value of second select box according first select box.

How to change value of second select box according first select box.manually is easy, basicaly the same thing as for the first just with a different SQL request.