Okay so I've asked you guys about this earlier, but I have another question! after all that's what you guys do is help newbies! =] Okay! So I have a program that will alow users to register for a LAN party we host that works yeah yeah, but... what If I want to delete their name from the list? or add information about them such as "reserving chairs 37 thorough 42" etc. I'll paste the code.
<html>
<body>
<center>
<font face="tahoma" color="red">
<?php
$thanks = "Hey $player_name, the handle $player_handle was added successfully to the database!\n";
if ($submit) {
$db = mysql_connect("localhost", "bawmlanc", "letmein");
mysql_select_db("bawmlanc_playerstats",$db);
$sql = "INSERT INTO bawm_players (player_name,player_handle) VALUES ('$player_name','$player_handle')";
$result = mysql_query($sql);
echo $thanks;
} else{
?>
<font face="tahoma" color="red">
<form method="post" action="<?php echo $PHP_SELF?>">
<input type="hidden" name="id" value="<?php echo $myrow['id'] ?>">
<strong>Add player to player list</strong><br><hr>
name: <input type="Text" name="player_name"><br><hr>
handle: <input type="Text" name="player_handle"><br><hr>
<input type="Submit" name="submit" value="Add player">
<input type="reset" name="reset" value="Reset">
</font>
</form>
<?php
} // end if
?><br><font face="tahoma" color="red">
Current players<br></font>
<select name="player_list">
<?php
$con = mysql_connect("localhost","letmein","wayne224");
// "localhost" is used if the db server is on the
//same computer the web server is on....
$selectdb = mysql_select_db("bawmlanc_playerstats",$con);
$query = mysql_query("SELECT * FROM bawm_players");
// Creates an array of items with keys corresponding to table columns...
while($row = mysql_fetch_array($query))
{
//Create the HTML table
echo "<option value='" . $row['id'] . "'>" . $row['player_name'] . "</option>";
}
?>
</select>
</body></center>
okay so that's the code in addplayer.php and this program as of right now is just one file. I want to spread it out soon through addplayer.php / viewplayer.php / addplayernow.php or something like that you know? But my problem as of right now is I want to be able to select a user from the drop down list, and have some buttons on the bottom like "add info to player" "delete player" "add new player" "update player" etc so maybe you guys could help me with that? I want all these options to be in a seperate admin area too where I have control, but i'm trying to figure out how to build that i'm not asking you guys to code for me i'm just simply very new to php and really don't know how to do it.
thanks
-bryan