Jump to content

PHP Help


Ell20

Recommended Posts

Hey guys,

 

Im working on a sports club website.

I have in place already fixtures and teams for a particular club.

 

Now id like to be able to select players to play in each fixture. I have created a teamselection.php page which I have created a dynamic drop down box to list all the fixtures that are linked to the club which the user is logged into.

 

From here, once the user has selected the fixture, I want to create a list of the players currently selected as playing in that game.

For this I have created a new table called team_selection which will be used to store the players that are playing in each fixture.

 

Here is my code so far:

 

<table width="60%" align="center" cellpadding="0" cellspacing="0" border="0" class="game">
<tr>
<th colspan="2">
Team Selection
</th>
</tr>
<tr>
<td width="63%">
<b>
Select Fixture You Wish To View Team Selection For:
</b>
</td>
<td align="center">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<select name="fixturedrp"><option value='' selected disabled>Select Fixture</option>
<?php 
$sql = "SELECT * FROM fixtures WHERE club_id = '$id'";
  	$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
	$fixture_id = $row["fixture_id"];
	$team = $row["team"];
	$opponents = $row["opponents"];
	$fixture = "$team Vs $opponents";
?>
<option value="<?php echo $fixture_id ?>"><?php echo $fixture ?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td width="63%">
</td>
<td align="center">
<input name="submit" type="submit" value="Select Fixture" />
</form
</td>
</tr>
</table>

 

How would I go about the adding players to the fixture?

 

Cheers

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.