I am stumped on this one… I know it’s something obvious… but supposedly this is only two lines of code. I believe I have number one coded correctly, but I’m not sure about number two. I just can’t get it to display correctly. :-X What am I doing wrong on #2? Anyone??
[code]<?php
// 1. create an SQL statement to display all categories, omitting duplicates, and sort by category
$MySQL = “SELECT DISTINCT Category
FROM Movies
ORDER BY Category”;
// **********************************************************************
// execute the SQL statement
$QueryResult = @mysql_query($MySQL, $MyDSN);
// display all of the categories as options in the select list
while ($row = mysql_fetch_array($QueryResult))
{
// 2. display a category as an option, using this format: Comedy\n
echo "Comedy\n;
// **********************************************************************
} // end while
echo “\n”;
?>
[/code]