wsrta Posted October 25, 2022 Share Posted October 25, 2022 Can someone please help me I'm stuck with the validation of the room reservation. The room reservation should not double book a room how can I achieve this? <?php $sql = "SELECT * FROM studentrequest"; $result = mysqli_query($conn,$sql); if($result){ while($row = mysqli_fetch_assoc($result)){ $srequestid = $row['studentrequestid']; $studentid = $row['studentID']; $studentname = $row['studentName']; $roomnumber = $row['roomNumber']; $instructor = $row['instructor']; $dateuse = $row['dateUsed']; $ts = $row['timeStart']; $te = $row['timeEnd']; echo ' <tr> <th scope="row">'.$srequestid.'</th> <td>'.$studentid.'</td> <td>'.$studentname.'</td> <td>'.$roomnumber.'</td> <td>'.$instructor.'</td> <td>'.$dateuse.'</td> <td>'.$ts.'</td> <td>'.$te.'</td> </tr>'; } } ?> </tbody> </table> </main> </body> </html> <?php Quote Link to comment https://forums.phpfreaks.com/topic/315455-double-booking/ Share on other sites More sharing options...
Barand Posted October 25, 2022 Share Posted October 25, 2022 This tutorial may help Quote Link to comment https://forums.phpfreaks.com/topic/315455-double-booking/#findComment-1601908 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.