dummyagain
January 8th, 2008, 01:10 PM
I would like to use php to get the vaue from the drop down box.
My case is that when the user choose a group from a drop down box, it will load the name list from the group.
Here is my code
$result = mysql_query("SELECT name FROM invitelist where group = " . group2)
// group2 is the value from the drop down box in the same form and i am //not sure if this line is correct
or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
echo "<option value=\"$row['name']>\"" . $row['name'] . "</option>";
}
however, i get an error of Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/a6870809/public_html/index.php on line 43
Thanks
My case is that when the user choose a group from a drop down box, it will load the name list from the group.
Here is my code
$result = mysql_query("SELECT name FROM invitelist where group = " . group2)
// group2 is the value from the drop down box in the same form and i am //not sure if this line is correct
or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
echo "<option value=\"$row['name']>\"" . $row['name'] . "</option>";
}
however, i get an error of Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/a6870809/public_html/index.php on line 43
Thanks