Quote:
|
Originally Posted by HHSJosh
I'm confused, do you mean that you're just outputting the names of the fields? What exactly is contained in the drop-down lists?
|
Well, I figured I'd do that part inputing the stuff I wanted manually.
But a new question has arisen.
My question now is, I need to get the value from the field after clicking on the submit button. Here's my code:
PHP Code:
<?
// more code above and below this snipplet
$belt = $_POST["belt"];
<form action="admin_cp.php?user=<?echo("$user"); ?>" method="POST">
<b>Belt To Change:</b>
<select size="1" name="belt">
<option>Heavyweight</option>
<option>TV</option>
<option>Cruiserweight</option>
<option>No Limits</option>
<option>Tag Team</option>
</select>
</form>
<br><br>
<input type=hidden name=admin_login>
<input type="submit" name=updated value="Update Belt">
</form>
<?
if($belt){
$query = mysql_query("SELECT $belt FROM belt_owner");
$holder = mysql_fetch_array($query);
?>
<form action="#">
<input type=text value="<? echo("$holder"); ?>">
</form>
So, let's say the user chooses TV, and the belt owner's name is Ted. I'd like it to output "Teddy" into the input box.
Mainly, I just need to select the correct belt from the table, and output who owns it so far.
I don't mean to be seeming like I'm asking how to do this whole thing, I've just been working on this for the whole day, and it's starting to get underneath my skin here.
** PS: I know it sounds like wrestling here, I'm helping a friend on a summer project **