Returning All flights from the attached code

[php]

<?php include 'connection.php'; $sql = "SELECT origin,destination,departure,arrival,craftoperator,date,returndte,operatorlogo,Price FROM test WHERE origin = '".$_POST['origin']."' AND destination = '".$_POST['destination']."' AND date = '".$_POST['departure']."' AND returndte = '".$_POST['return']."' "; $result = $conn->query($sql); while($row = mysqli_fetch_assoc($result)) { $output[]=$row; } print(json_encode($output)); ?>

[/php]

Kindly see attachments below the output.png file shows my desired output with pagination even better then second image is how far i have come and the code is what i have written so far and am stuck


Well, you did not ask a question. What is your problem and what do you need help with?
If you mean that the pictures are what you want to end up with, we would need to know what data you are working with.
What does the output from the Json give you?

Not sure what you need help with!

Guessing this is for school? If it were a real system, you would hit the airline API, not your database, which should be using prepared statements…

Sponsor our Newsletter | Privacy Policy | Terms of Service