The following code is working without errors:

                        <td>Booking No.</td>
                        <td>Driver Id</td>
                        <td>Time Booked</td>
                        <td>Pick Up Time</td>
                        <td>No. of Passengers</td>
                        $stmt = $dbh->prepare("SELECT * FROM Booking
                          WHERE cust_id = '$username'
                        while($row = $stmt->fetch(PDO::FETCH_ASSOC)){
                            echo "<tr><td>".$row['booking_no']."</td>".

However rather than the field headings being displayed above the rows each piece of data is appearing above the field headings apart from the booking_no. The output is like this:

driverneil2012-01-28 01:00:00Oxford2012-01-28 01:30:00London21540.00
Booking No. 	Driver Id 	Time Booked 	From 	Pick Up Time 	To 	No. of Passengers 	Distance 	Cost

Anyone know why this is happening?

Also is there a better way of outputting this data using PDOs?

Thanks in advance.

You are missing <td> 's.

You are missing <td> 's.

LOL what a silly mistake, guess that is what tiredness does to you!