I am so proud of myself today, this is my best breakthrough in PHP and MySQL yet - I must be the "Most Developed Newbie" of the month:
Here is the code that perfectly works and fixes my problems:
<?php
$display_title = mysql_query("SELECT pagetitle FROM legal WHERE pageid=$pageid")
or die ("MySQL Error - Please report this to the webmaster");
if ($pageid >6)
{
echo("No Such Page");
}
else
{
while ($row = mysql_fetch_array($display_title))
{
$legal = $row["pagetitle"];
echo $legal;
}
}
?>
Now let me explain this to you younguns. I thought, why not just put my while statement as the FALSE return. That is if the pageid is bigger than 6, it will proceed as normal. Just look and be enflamed in jealousy - I am so proud today - || PAT ON THE BACK ||. Thanks ir4z0r for starting me off though 😉