Unique Submit Buttons Won't Post
Posted: Tue May 24, 2011 2:14 pm
I can't figure out why my $_POST['join'] isn't working. Does my form need to be inside my foreach?
<?php
if(is_admin($user_info['uid'], $info['companyid']) === false)
{
if (isset($_POST['join']))
{
echo "works";
die();
}
$companies = fetch_company_by_name($info['cname']);
?>
<table class="feed pts pbl">
<?php
foreach ($companies as $company)
{
?>
<tr class="mbm">
<td>
<form method="post" id="ccreateform" class="man">
<input type="submit" name="join[<?php echo $company['companyid']; ?>]" value="Join" />
</form>
</td>
</tr>
<?php
}
?>
</table>
<?php
}
?>