To start, dont use a do...while() loop for printing out the values.
Change
do {
$ip = $myrow["user_ip"];
print("<tr>
<td width=\"10%\">
<p align=\"center\"><font size=\"1\">$id</td>
<td width=\"20%\"><p align=\"center\"><font size=\"1\">$ip</td>
<td width=\"35%\"><p align=\"center\"><font size=\"1\">$num</td>
<td width=\"35%\"><p align=\"center\"><font size=\"1\">$access_time</td>
</tr>");
} while ($myrow = mysql_fetch_array($result));
to...
while($myrow = mysql_fetch_array($result)) {
$ip = $myrow['user_ip'];
...
and instead of referencing your variables as $id, $num, and $access_time, they are results of the mysql_fetch_array function so they must be treated as so, and referenced like $myrow['id']; and $myrow['num'];