PHP link problem
<p>I'm trying to display a link orange when clicked but for some reason I can get it to work when using PHP can some one help me correct this problem?</p>

<p>Here is the PHP code.</p>

<pre><code>function category_tree( $parent = 0, $parent_url = '' ){
    $page_url = current_page_url();//grabs url address

    echo "&lt;ol&gt;";
    $mysqli = mysqli_connect("localhost", "root", "", "sitename");
    $q = sprintf("SELECT id, category, url FROM categories WHERE parent_id = %d ORDER BY category asc", $parent);
    $r = mysqli_query($mysqli, $q);
    while($rs = mysqli_fetch_assoc($r) ){
        $url = $parent_url . $rs['url'];
        echo '&lt;li&gt; &lt;a href="' . $url . '" title="' . $rs['category'] . ' Category Link" ';

        if($url == $page_url){
            echo 'style="color: orange;"';
        }

        echo '&gt;' . $rs['category'] . '&lt;/a&gt; &lt;/li&gt;';
        category_tree($rs['id'], $url);
    }
    mysqli_free_result( $r );
    echo "&lt;/ol&gt;";
}
</code></pre>

<p>Output:</p>

<pre><code>Arts &amp; Humanities
Autos
Business
Computers &amp; Technology
Creative Writing
Education
Entertainment
</code></pre>
