Change to this code portion Edwin
//select the row in the table that matches the passed variable from the form submission
$query="SELECT * FROM `pages` WHERE `url` = '".$preview_url."'";
$result=mysql_query($query);
if (!$result) {
die(mysql_error());
}
// assign mySQL values from table to php variables
$email = mysql_result($result,1,'email');
$date=mysql_result($result,1,"date");
$title=mysql_result($result,1,"title");
$id=mysql_result($result,1,"id");
$items=mysql_result($result,1,"items");
$url=mysql_result($result,1,"url");
$expiry=mysql_result($result,1,"expiry");
//close the mySQL connection
mysql_close();
Also, if you are truly hungry to be learning, then know that mysql_ functions are deprecated and will dissapear soon. Learn to use the mysqli_ functionality and PDO.