xwishmasterx Posted May 5, 2011 Share Posted May 5, 2011 I have the code below to output a list: while ($row = mysql_fetch_array($rs_teambydate)) { echo "<tr><td width='200'>".$row['team_name']." (".$row['members_count'].")</td><td><input type='submit' name='".$row['team_name']."' value='Plunder'/></td>"; } This is all inside a form so I can use the following to get various includes: <? if(isset($_POST['".$row['team_name']."'])){ include ('resources.php');} ?> My problem is this part : $_POST['".$row['team_name']."'], as this obviously doesn't work. Anyone know how I can add the "$row['team_name']" inside $_POST[' '] ? Link to comment https://forums.phpfreaks.com/topic/235581-need-help-adding-a-row-to-a-post/ Share on other sites More sharing options...
JKG Posted May 5, 2011 Share Posted May 5, 2011 put it in a hidden field in the form you are posting? Link to comment https://forums.phpfreaks.com/topic/235581-need-help-adding-a-row-to-a-post/#findComment-1210812 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.