<?php
$where="";
if(isset($_POST['courier_no']))
{
$var2 = explode(",",$var);
$where=" AND A.courier_no= ". $_POST['courier_no'];
}
?> // here i get courier_no. and i want to display details if no exist in daatabase..
please help in this regards
$sql=("SELECT A.courier_id, A.courier_no , A.sender_name ,A.saddress,
B.location_name AS Sender_location ,
A.reciever_name ,A.raddress ,
C.location_name AS Reciever_location
FROM courier_detail A,location B,location C
WHERE A.location2 = B.location_id AND
A.location_id = C.location_id AND A.isdelete=0 ".$where) ; // using this query i want to display record set .
$result =mysql_query($sql);
while($row = mysql_fetch_array($result))
{
// here i fetch all details
}