Here is my Code....
while($row = $result->fetch()){ ?> //fetches design
<input type="radio" name='<?php echo $row['design'] ?>' value='accept'>approve
<input type="radio" name='<?php echo $row['design'] ?>' value='reject'>reject
<input type="hidden" name='design[]' value='<?php echo $row['design'] ?>'>
Comments:<input type="text" name="comments[]" style="width:200px;">
<input type='submit' name='submitDesign' value="Submit">
if (isset($_POST['submitDesig
n'])) {
$design =$_POST['designs']; // gets our jpg array
$com = $_POST['comments']; //gets our comment array
if (isset($_POST['submitDesig
n'])) {
<?php for ($i = 0; $i <$count; $i++){
$d = $design[$i]; // returns ***.jpg
$c =$com[$i]; // returns user comments for ***.jpg
if($_POST['$d'] == 'accept'){
$approved= 'approved';
}else($_POST['$d'] == 'reject'){
$approved='rejected';
}
In laymens terms, what I am trying to do is get the name from the radio button after it submits. I thought I could grab the variable with a post.
I was trying to come up with the post value of the variable using the hidden field to grab the name of the radio button so I can get the value out of it.
So basically I need something like this $_POST[echo $row['design'] ]
Start Free Trial