Jump to content

Need help adding a "$row..." to a "$POST..."


xwishmasterx

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.