hello,
I have this code that pulls a list of Usernames from the users table and populates a list menu.
$query = mysql_query("SELECT DISTINCT `username` FROM `users`")
OR die(mysql_error());
echo '<select name="username" class="green2">' . "\n";
while ($row = mysql_fetch_array($query))
{
$Category2 = htmlspecialchars(stripslashes($row['username']));
echo '<option value="' . $Category2 . '">' . $Category2 . "</option>\n";
}
echo '</select>' . "\n";
My SQL statement on the next page that this submits to is like this...
$sql = mysql_query("INSERT INTO artwork (art_name, location, medium, username, pic_path, thum_path)
VALUES ('$name', '$location', '$Category', '$Category2', '$picpath', '$thumpath')") ;
Any ideas as to why im getting blank enteries into the database?
Everything else is working accept Category and Category2
Thanks