Jump to content

wsrta

New Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by wsrta

  1. code for the confirm button <?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> <td> <button type="button" class="btn btn-outline-success" data-toggle="modal" data-target="# ">Confirm</a></button> <div class="modal fade" id="confirm" tabindex="-1" role="dialog" aria-labelledby="comfirms" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="confirms">Alert!</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> Are you sure you want to confirm this? <br><br> <h3>Details</h3> Name: '.$studentname.' <br> Room number: '.$roomnumber.' <br> Date use: '.$dateuse.' <br> Time start: '.$ts.' <br> Time end: '.$te.' <br> </div>
  2. The thing is I already asssociated the modal to the details which is the name,date,timestart,timeend but when I choose the second data to view it is still showing the first table data
  3. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.