Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'dbconn.php';
- $user=$_POST['user'];
- $data=array();
- $select = $mysqli->prepare('SELECT * from tb_transaction where `status`=2 and requestor=? ');
- $select->bind_param('s',$user);
- if($select->execute()){
- $result=$select->get_result();
- $id=0;
- while($row=$result->fetch_array()){
- $data[]=$row['requestor'];
- $data[]=$row['from_date'];
- $data[]=$row['to_date'];
- $data[]=$row['pickup_location'];
- $data[]=$row['destination_location'];
- $data[]=$row['purpose'];
- $data[]=$row['no_passenger'];
- $data[]=$row['id'];
- }
- echo json_encode($data);
- }else{
- echo $select->error;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement