How to get status of radio buttons
<p>Please how can I get the status of radio buttons based on their value in the database?
I want to set them to either checked or unchecked based on their respective values in the database. field_type is int(1 or 0).
Is there a more efficient way to do this?</p>

<p>$news_alert_status_a = "unchecked";
        $news_alert_status_k = "unchecked";
        $news_alert_status_n = "unchecked";</p>

<pre><code>    $events_alert_status_a = "unchecked";
    $events_alert_status_k = "unchecked";
    $events_alert_status_n = "unchecked";

    $questions_alert_status_a = "unchecked";
    $questions_alert_status_k = "unchecked";
    $questions_alert_status_n = "unchecked";

    $editorials_alert_status_a = "unchecked";
    $editorials_alert_status_k = "unchecked";
    $editorials_alert_status_n = "unchecked";


    if ($news_alert == 1)
    {
        $news_alert_status_a = "checked";
    }
    elseif ($news_alert == 2)
    {
        $news_alert_status_k = "checked";
}
elseif($news_alert == 3)
{
    $news_alert_status_n = "checked";
}


if ($events_alert == 1)
    {
        $events_alert_status_a = "checked";
    }
    elseif ($events_alert == 2)
    {
        $events_alert_status_k = "checked";
}
elseif($events_alert == 3)
{
    $events_alert_status_n = "checked";
}

if ($questions_alert == 1)
    {
        $questions_alert_status_a = "checked";
    }
    elseif ($questions_alert == 2)
    {
        $questions_alert_status_k = "checked";
}
elseif($questions_alert == 3)
{
    $questions_alert_status_n = "checked";
}       

if ($editorials_alert == 1)
    {
        $editorials_alert_status_a = "checked";
    }
    elseif ($editorials_alert == 2)
    {
        $editorials_alert_status_k = "checked";
}
elseif($editorials_alert == 3)
{
    $editorials_alert_status_n = "checked";
}           
</code></pre>
