<?php

        require_once './includes/config.php';


        $con = new mysqli(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);


        $sql = "SELECT * FROM contact-info";


        if($result = $con->query($sql)){

            while($row = $result->fetch_object()){
                //display record 1 by 1  
                printf(' 
                        <tr> 
                        <td>%s</td> 
                        <td>%s</td> 
                        <td>%s</td> 
                        <td>%s</td> 
                        <td>%s</td>
                        </tr>
                           ',$row->id,
                             $row->name,
                             $row->email,
                             $row->phone,
                             $row->comment);
            }

        }

        printf('
                <tr> 
                <td colspan="5">
                %d record(s) returned. 
                [ <a href="insert-student.php">Insert Student</a> ]
                </td>
                </tr>
                ',$result->num_rows);

        $con->close();

        ?>

I don't have your database to test against so for now drop some debug echo or prints on those lines 11, 13 and after 15 to show where in your code it stopped.

example:
11 print "Now at line 11"
13 print "Now at line 13."

Spiffy up for formatting and maybe print how many records found.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.