Can someone tell me why this code won't work? I'm new to PHP. When I click submit it doesn't do anything, other than that it pulls the info I want it to.
code: <select name="user">
<FORM METHOD="POST" ACTION="form.php">
<?php
$db_name = "dsm";
$table_name = "dsm_names";
$connection = mysql_connect("localhost", "dsm", "1234")
or die(mysql_error());
$db = @mysql_select_db($db_name, $connection) or die(mysql_error());
$sql = "SELECT * FROM $table_name ORDER BY first";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
$user_id = $row['id'];
$first_name = $row['first'];
$last_name = $row['last'];
$user_name = trim("$first_name $last_name");
echo "<option value=\"".$row['id']."\">".$user_name."\n ";
}
?>
</select>
<INPUT TYPE="Submit" Name="Submit" Value="Submit Form">
|
Sorry, I can't hear a word you're saying!
|
|