Hello, I was wondering how to make a dropdown menue that is using a database. I am trying to use the following code but it gives me errors.
PHP Code:
$q mysql_query("SELECT * FROM plan");
$r mysql_num_rows($q); 
if (!
$r) {
echo 
'There are no plans at this time';
}
echo 
'<select name=</FONT>[size=1][color=#0000f0]"package"[/color][/size][size=1]>';
while( 
$r mysql_fetch_array($q) )
{
if (
$package == .stripslashes($r['name']).) {
echo (
'<option selected value='.stripslashes($r['name']).'>'.stripslashes($r['name']).'</option>');
} else {
echo (
'<option value='.stripslashes($r['name']).'>'.stripslashes($r['name']).'</option>');
}

echo 
'</select>';

 [/
size
PHP Code:
echo '<select name="package")';
[
size=1]if ($package == "name") {
echo 
'<option selected value=<font size="1"> 
 
It is supposed to query a database and insert the name into the code like the following:
</font>[size=1][color=#0000f0]"[color=#000000]name[/color]"[/color][/size][size=1]>name</option>'
;
} else {
echo 
'<option value=[/size][size=1][color=#0000f0]"[color=#000000]name[/color]"[/color][/size][size=1]>name</option>';
}[/
size]
[
size=1]echo '</select>
[/size] 
I get the folowing errors with the first code.
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'

Would you please post your suggestions here please. Thanks!


[/size]