I am passing a varible to be used in another php form, but when i hit the submit button for the selection form the value of the Previous forms field name disappears.
Form 1:
Form 2:
i don't understand
Form 1:
Code:
<?php
echo "
<html>
<head>
</head>
<body>
<form action='selection.php', method='post'>
Table Name: <input type='text' name=\"Tname\" value=$Tname />
<br>
<input type='submit' name='Create' value='Create Team' />
</form>";
?>
Form 2:
Code:
echo $_POST["TeamName"];
echo $Team;
$query="SELECT * FROM NFL_Players";
$result=mysql_query($query, $conn);
echo mysql_error();
echo "<b>";
echo "<form action='selection.php' method='post'>";
echo "<select name='Plyr' size='10'>";
while ($row = mysql_fetch_array($result))
{
echo "<option>";
echo $row['Player'];
echo "</option>";
echo "<br>";
}
echo "</select>";
echo "<input type='hidden' name='TeamName' value=$Team />";
echo "<input type='submit' />";
echo "</form>";
i don't understand