WordPress.org

Ready to get started?Download WordPress

Forums

WP exec PHP
Navigation Bar disappear after I connect to DB and set query (1 post)

  1. rudiiliu
    Member
    Posted 7 months ago #

    Hello, the php codes work perfectly.
    here's the code:
    <?php

    //Connect to the database
    if (!($connection = mysql_connect('localhost','root', 'passwordispassword')))
    {die("Could not connect");}

    if (!(mysql_select_db('shopandbox', $connection)))
    {die("Could not connect");}

    $query= "SELECT * FROM a9qn5_users Where id='676' ";
    $result = mysql_query($query);
    $row = mysql_fetch_array($result);
    echo " hi ".$row['username']." testing only. why the navbar gone?";

    mysql_close($connection);?>

    but my navigation bar all gone except for Home.
    can be seen in my blog here:
    this page is under Shopper's Voice menu bar.
    http://www.shopandbox.com/blog/shoppers-voice-3/

    to see the existing menu bar go here:
    http://www.shopandbox.com/blog/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.