First you get the list of games
$strQuery="SELECT * FROM TEST";
$recordSet=mysql_query($strQuery,$connection);
build the select option
$strSelect='<SELECT NAME=X>';
while ($row= mysql_fetch_array($recordSet)) {
$strSelect.='<OPTION VALUE='.$row['gameId'].'>'.$row['gameName'].'</OPTION>';
} $strSelect.='</SELECT>';
print this select between the form tag.
after selection process is completed, you should post to same page.
now you get
gameId=$_POST['X']
by using this gameid you can exicute your query as follows
$sql = "SELECT * FROM test where id=".gameId;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PHP & MySQL" group. To post to this group, send email to phpmysql googlegroups.com To unsubscribe from this group, send email to phpmysql-unsubscribe googlegroups.com For more options, visit this group at http://groups-beta.google.com/group/phpmysql -~----------~----~----~----~------~----~------~--~---
|