php while statement causing 500 error
<p>I'm completely stumped here.  I've written the code below and when I view the page I get a 500 error.  Via process of commenting out select lines one by one I was able to find that the while statement is causing the error...could anyone tell me what could possible be wrong with my code?</p>

<pre><code>&lt;?php 
                $rQuery = "SELECT * FROM roles ORDER BY roleName ASC";
                $rResult = mysql_query($rQuery);

                if (!$rResult){
                    echo 'Query Error &lt;br&gt;' . $rQuery;
                    exit;
                }

            ?&gt;
            &lt;p&gt;
                &lt;select name="roleaddid" id="roleaddid" &gt;

                  &lt;?php while ($roles = mysql_fetch_array($rResult)){ ?&gt;

                    &lt;option value="&lt;?php echo $roles['roleId'] ?&gt;"&gt;&lt;?php echo $roles['roleName'] ?&gt;&lt;/option&gt;

                    &lt;? } // end while ?&gt;

                &lt;/select&gt;

            &lt;/p&gt;
</code></pre>

<p>thanks for any insight...</p>
