Hello,
I have this code over here:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Admin area - Sydcul URL Shortener</title>
<meta name="description" content="Free URL shortener">
<meta name="keywords" content="sydcul, url, shortener, tiny, url, tinyurl, bit, ly, bitly">
<meta name="author" content="Sydcul">
<link href="../stylesheet.css" rel="stylesheet" type="text/css">
<link rel="icon" type="image/ico" href="../favicon.ico">
</head>
<body>
<center>
<h1>Admin area - Sydcul URL Shortener</h1>
<h2>URLs:</h2>
<?php
include ('../config.inc.php');
$connection = mysql_connect($host, $user, $password);
mysql_select_db($database, $connection);
$urls = mysql_query("SELECT * FROM `" . $prefix . "urls`");
$array = mysql_fetch_array($urls);
if(!empty($array)) {
echo('<table border="1"><tr><th>Short url</th><th>Long url</th><th>Actions</th></tr>');
while($row = mysql_fetch_array($urls))
{
echo('<tr><td>http://short.sydcul.com/' . $row['shorturl'] . '</td><td>' . $row['longurl'] . '</td><td><a href="delete.php?shorturl=' . $row['shorturl'] . '">Delete</a></td></tr>');
}
echo('</table>');
} else {
echo('There are currently no shortened URLs. Create one using the homepage.');
}
mysql_close($connection);
?>
</center>
</body>
</html>
However, it is not showing the first item.
My DB:
And the output page:
This used to work at some point. I can't remember what I changed...
I tried using $array in the while-loop, but that shows GMail infinitely...