All pastes #629939 Raw Edit

Stuff

public text v1 · immutable
·published 2007-07-22 20:00 UTC
rendered paste body
<form name="profileview" method="post" action="profile2.php?user_id=<?php echo $x[user_id]?>">
<?php
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n"; 
echo "<tr>\n"; 
echo "<td>View:</td>\n"; 
echo "<td><select name=\"\">\n"; 
echo "<option value=\"\"></option>\n"; 

 
$sql = mysql_query("SELECT * FROM users WHERE user_id != '$user_id' ORDER BY username"); 
if (mysql_num_rows($sql) > 0) { 
  while ($x = mysql_fetch_assoc($sql)) echo "<option value=\"\">$x[username], $x[user_id]</option>\n"; 
}

echo "</td>\n"; 
echo "</tr>\n"; 
echo "<tr>\n"; 
echo "<td></td>\n"; 
echo "<input name=\"action\" type=\"hidden\" id=\"action\" value=\"View\">\n"; 
echo "<td><input type=\"submit\" name=\"submit\" value=\"View\" /></td>\n"; 
echo "</tr>\n"; 
echo "</table>\n"; 
echo "</form></left>\n"; 
 
?>

<form name="profileview" method="post" action="profile2.php?user_id=<?php echo $x[user_id]?>">
in question here is this $x[user_id] i get no id in the action line but i do get username and id for the option value in script above.
how is it that i can get this same id into the action line? anyone have any ideas?