Jump to content

Parse error: syntax error, unexpected token "endwhile" in php file


kazumii

Recommended Posts

Hello, i got a problem with my codes, it says  Parse error: syntax error, unexpected token "endwhile" . Please help me, Here's my code:
 

<?php
                    include "connection.php";
                    
                    if(isset($_POST['submit'])){
                        $from= $_POST['fromdate'];
                        $to= $_POST['todate'];
                        $result = $conn->query("SELECT * FROM tbl_employee WHERE tbl_hiringdate BETWEEN '$from' and '$to'");

                        while($rows=mysqli_fetch_array($result));
                ?>    
                
                <tr style="color:white; text-align:center">
                        <td><?php echo $rows['tbl_id'];?></td>
                        <td><?php echo $rows['tbl_name'];?></td>
                        <td><?php echo $rows['tbl_surname'];?></td>
                        <td><?php echo $rows['tbl_maidenname'];?></td>
                        <td><?php echo $rows['tbl_fathername'];?></td>
                        <td><?php echo $rows['tbl_mothername'];?></td>
                        <td><?php echo $rows['tbl_birthplace'];?></td>
                        <td><?php echo $rows['tbl_bday'];?></td>
                        <td><?php echo $rows['tbl_sex'];?></td>
                        <td><?php echo $rows['tbl_drive'];?></td>
                        <td><?php echo $rows['tbl_marital'];?></td>
                        <td><?php echo $rows['tbl_nationality'];?></td>
                        <td><?php echo $rows['tbl_military'];?></td>
                        <td><?php echo $rows['tbl_disability'];?></td>
                        <td><?php echo $rows['tbl_blood'];?></td>
                        <td><?php echo $rows['tbl_companyname'];?></td>
                        <td><?php echo $rows['tbl_homeaddress'];?></td>
                        <td><?php echo $rows['tbl_homephone'];?></td>
                        <td><?php echo $rows['tbl_mobilephone'];?></td>
                        <td><?php echo $rows['tbl_email'];?></td>
                        <td><?php echo $rows['tbl_profession'];?></td>
                        <td><?php echo $rows['tbl_experience'];?></td>
                        <td><?php echo $rows['tbl_school'];?></td>
                        <td><?php echo $rows['tbl_department'];?></td>
                        <td><?php echo $rows['tbl_hireddepartment'];?></td>
                        <td><?php echo $rows['tbl_hiringdate'];?></td>
                        <td><?php echo $rows['tbl_contactname'];?></td>
                        <td><?php echo $rows['tbl_contactaddress'];?></td>
                        <td><?php echo $rows['tbl_contactphone'];?></td>
                        <td><?php echo $rows['tbl_contactemail'];?></td>
                        <td><?php echo $rows['tbl_relation'];?></td>
                        <td><?php echo $rows['tbl_position'];?></td>
                        <td><?php echo $rows['tbl_jobdescription'];?></td>
                        <td><?php echo $rows['tbl_rate'];?></td>
                        <td><?php echo $rows['tbl_building'];?></td>
                        <td><a href="update.php?id=<?php echo $rows['tbl_id'];?>"><button type="submit" name="update" class="btn btn-dark btn-md">Update</button><br><br>
                        <a href="delete.php?id=<?php echo $rows['tbl_id'];?>"><button type="submit" name="delete" class="btn btn-dark btn-md">Delete</button></td>
                </tr>
                    <?php endwhile;
                    } 
                    ?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.