php code
Code:
$from=$_GET['from']; $to=$_GET['to']; $query1="select ci.contact_id,w.name as depot from user_account u join wholesale_depot_id w on w.contact_id=u.contact_id where u.user_name='$uname'"; $result1=db_query($query1); $row1=db_fetch_array($result1); $depot_id=$row1['contact_id']; $sl=0; echo $query2="select mi.medicine_id,mi.batch,mi.expiry_date,mi.purchase_date,mi.quantity_received,mm.name as product,c.name as company from medicine_item mi left join medsoft_medicine mm on mm.id=mi.medicine_id left join company c on c.id=mm.company_id where mi.expiry_date between '$from' and '$to' and mi.wholesale_depot_id='$depot_id'"; design code <td height="17">From date</td> <td><input type="text" name="from" id="from" class="tcal" size="22" /></td> <td>**To Date</td> <td><input type="text" name="to" id="to" class="tcal" /></td>
Comment