PHP/MYSQL while loop only displays the last record
<p>I have this code:</p>

<pre><code>include('config.php');

$result = mysql_query("SELECT * FROM system");
while($row = mysql_fetch_array( $result )) {
    $name_system = $row['name'];
    $value_system = $row['value'];

    if($name_system=='website_register' AND $value_system==1)
        {$register_system = 1;}
    else
        {$register_system = 0;}

    if($name_system=='website_offline' AND $value_system==1)
        {$offline_system = 1;}
    else
        {$offline_system = 0;}
}
</code></pre>

<p>My problem is the fact that the loop only displays the last record from "system" table.</p>
