PHP help on declaring variables inside of a variable
<p>Okay, so I have a page that calls a list of information from a msyql database.  say, i have a table called TABLE with columns id, name, phone numbers, and a radio button group (home,cell,work) etc. I've created a script that prints out in a table the name, phone number, and "status (not sure what best to call this, but it's the value of the radio buttons) the radio buttons.  What I would like to do is make it so that for each row, if i assign a value to the radio buttons, it will edit the status part. so say, on row 1, i click home, and row 2, cell, and row 3 home... and so forth, and i hit a submit button it will update the database.</p>

<p>So, this is my code for the radio button section in the table. This is under a php tag</p>

<p>What I ended up doing basically is calling each group of radio buttons, status_type1, status_type2, status_type3... basically radio name='status_type".$info['id']."</p>

<p>I want to do an if statement to see if there are values assigned from any clicks on the buttons, then submit them for entry. This is what I have so far.</p>

<pre><code>//Radio Button Template
  &lt;fieldset&gt;
&lt;input type='radio' id='status_type_home' name='status_type".$info['id']."' value='home'  /&gt;
    &lt;label for='status_type_home'&gt;home&lt;/label&gt;
&lt;input type='radio' id='status_type_work' name='status_type".$info['id']."' value='work'  /&gt;
    &lt;label for='status_type_work'&gt;work&lt;/label&gt;
&lt;input type='radio' id='status_type_cell' name='status_type".$info['id']."' value='cell'  /&gt;
    &lt;label for='status_type_cell'&gt;cell&lt;/label&gt;
&lt;/fieldset&gt;

 &lt;/td&gt;";


//If statement to submit radio buttons

    if ($_POST['status_type "$info['id']"']) 
{
$edit_status_sql="UPDATE status SET type = 'status_type".$info['id'] . "' WHERE id = '" . $id . "'";

$edit_status_res=mysqli_query($connection, $edit_status_sql) or die(mysqli_error($connection));
}
</code></pre>

<p>The problem I have is basically, I've declared the name of the radio buttons as status_type[variable based on the id].  Unfortunately, this doesn't work.  I was wondering if anyone could help me figure out how i'm supposed to format it or if it's even possible to declare a variable within a variable.  Thanks!</p>
