So I am already using post to insert data from a HTML form to a MySQL database running on XAMPP, how would I then display this data on another HTML page in a table? When I try run it from localhost it comes up with a blank page with a line of code on the top. I am new to this, here is my code: am I doing it right?
<html>
<head>
</head>
<body>
    <?php
    $con = mysql_connect('localhost', 'root', '');
    if (!$con){
        die("Can not connect: " . mysql_error());
    }
    mysql_select_db("form_process", $con);
    $sql = "SELECT * FROM `form_submissions`";
    $myData = mysql_query($sql,$con);
    echo "<table border=1>
    <tr>
    <th>First Name</th>
    <th>Last Name</th>
    <th>Phone Number</th>
    <th>Class interested in</th>
    </tr>"; 
    while($row= mysql_fetch_array($result)){
        echo "<tr>";
        echo "<td>" . $record['First'] . "</td>";
        echo "<td>" . $record['Last'] . "</td>";
        echo "<td>" . $record['Phone'] . "</td>";
        echo "<td>" . $record['Class'] . "</td>";
        echo "</tr>";
    }
    echo "</table>";
    mysqli_close();
    ?>
</body>
</html>
 
     
     
    