I need one help.i need to set drop down value which is fetching from DB using PHP.I am explaining my code below.
<?php
$getcustomerobj = $dbobj->getFeedbackData($db,$id);
echo ($getcustomerobj->companypro);
?>
<select class="form-control" id="company_pro" name="company_pro" onChange="selectProductCompany(this.value)">
<option value="">Select Company/Product</option>
<option value="1" <?php if($getcustomerobj->companypro == 1 and $_REQUEST['companypro'] == 1){ print 'selected'; }?>>Select Company</option>
<option value="0" <?php if($getcustomerobj->companypro == 0 and $_REQUEST['companypro'] == 0){ print 'selected'; }?>>Select Product</option>
</select>
Here i can get the value of $getcustomerobj->companypro
as 1 but still unable to set it inside the drop down list.Please help me.