ShoeLace1291 Posted February 17, 2009 Share Posted February 17, 2009 I'm trying to make a match reporter. The script displays a form with a list of players that is set on the previous page. Then it cycles through the inputs and inserts the players' kills and deaths into a table. What would be the best way to do this? The players are stored in an array titled $players with their id's. Link to comment https://forums.phpfreaks.com/topic/145487-help-with-logic/ Share on other sites More sharing options...
drisate Posted February 17, 2009 Share Posted February 17, 2009 Not 100% sur i understand what you are saying but you can loop the array and insert them one by one foreach ($players as $value){ // INSERT the stuff $insert = mysql_query("INSERT INTO table (id) VALUE ('$value')") or die (mysql_error()); } Link to comment https://forums.phpfreaks.com/topic/145487-help-with-logic/#findComment-763797 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.