Announcement

Collapse
No announcement yet.

Including PHP page in vBulletin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Including PHP page in vBulletin

    First, let me say that I've read the Important page, and I have added other pages to my page via the phpinclude template; however, this situation seems to be different, as I get an error.

    When I put the following in, I get an error when I load a page in vB:
    Code:
    ob_start(); 
    require("../dropdown.php"); 
    $dropdown = ob_get_contents(); 
    ob_end_clean(); 
    
    dropdown.php looks like:

    Code:
    <select name="linkdir" onchange="window.open(this.options[this.selectedIndex].value,'_self')" size="1"> 
    <option selected>Links Directory</option>
    <option>----------</option>
    <?php
    $sql = @mysql_connect("localhost" , "user" , "password" );
    if (!$sql) {
    echo("error" );
    }
    $db = @mysql_select_db("megamasters" );
    if (!$db) {
    echo("error" );
    }
    
    $getData = mysql_query("SELECT * FROM dropdown" ); 
    while ($values = mysql_fetch_array($getData)) { 
    $title = $values['title'];
    $url = $values['url'];
    echo "<option value=\"$url\">$title</option>"; 
    } 
    ?> 
    </select>
    This is the error I'm receiving:

    Code:
    Database error in vBulletin 2.2.8:
    Invalid SQL: SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>1054577904
    mysql error: Table 'megamasters.session' doesn't exist
    mysql error number: 1146
    Date: Monday 02nd of June 2003 02:33:24 PM
    Script: http://www.megamasters.com/board/boa...p?s=&forumid=2
    Referer: http://www.megamasters.com/board/sho...=&threadid=677
    Basically, as you can see... vB starts to use the other database once I include that page.

    So, now that that's been said, does anyone have any ideas on how to get this to work?

    Thank for your time, I really appreciate it.

    Sincerely,
    Andrew Tatum
    Andrew Tatum
    FinHeaven &amp; Co - Get Splashed With FinForMation
    The FinHeaven & Co Forums - Your Opinion, Your Team, Speak It Here

  • #2
    Originally posted by WebmasterAJ
    First, let me say that I've read the Important page, and I have added other pages to my page via the phpinclude template; however, this situation seems to be different, as I get an error.

    When I put the following in, I get an error when I load a page in vB:
    Code:
    ob_start(); 
    require("../dropdown.php"); 
    $dropdown = ob_get_contents(); 
    ob_end_clean(); 
    
    dropdown.php looks like:

    Code:
    <select name="linkdir" onchange="window.open(this.options[this.selectedIndex].value,'_self')" size="1"> 
    <option selected>Links Directory</option>
    <option>----------</option>
    <?php
    $sql = @mysql_connect("localhost" , "user" , "password" );
    if (!$sql) {
    echo("error" );
    }
    $db = @mysql_select_db("megamasters" );
    if (!$db) {
    echo("error" );
    }
    
    $getData = mysql_query("SELECT * FROM dropdown" ); 
    while ($values = mysql_fetch_array($getData)) { 
    $title = $values['title'];
    $url = $values['url'];
    echo "<option value=\"$url\">$title</option>"; 
    } 
    ?> 
    </select>
    This is the error I'm receiving:

    Code:
    Database error in vBulletin 2.2.8:
    Invalid SQL: SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>1054577904
    mysql error: Table 'megamasters.session' doesn't exist
    mysql error number: 1146
    Date: Monday 02nd of June 2003 02:33:24 PM
    Script: http://www.megamasters.com/board/boa...p?s=&forumid=2
    Referer: http://www.megamasters.com/board/sho...=&threadid=677
    Basically, as you can see... vB starts to use the other database once I include that page.

    So, now that that's been said, does anyone have any ideas on how to get this to work?

    Thank for your time, I really appreciate it.

    Sincerely,
    Andrew Tatum
    Just wondering what are you trying to do?
    ManagerJosh, Owner of 4 XenForo Licenses, 1 vBulletin Legacy License, 1 Internet Brands Suite License
    Director, WorldSims.org | Gaming Hosting Administrator, SimGames.net, Urban Online Entertainment

    Comment


    • #3
      Originally posted by ManagerJosh
      Just wondering what are you trying to do?
      Hmmm... I guess the easiest way to put it is like this...

      I have an administration section for my site as a whole, and I have a drop down menu that "grabs" links from another MySQL database. The menu will basically includes affiliates for the site and what not. I now want to include that drop down menu on the boards, and not just the site....
      Andrew Tatum
      FinHeaven &amp; Co - Get Splashed With FinForMation
      The FinHeaven & Co Forums - Your Opinion, Your Team, Speak It Here

      Comment


      • #4
        Can anyone help me out? Please...
        Andrew Tatum
        FinHeaven &amp; Co - Get Splashed With FinForMation
        The FinHeaven & Co Forums - Your Opinion, Your Team, Speak It Here

        Comment


        • #5
          http://www.vbulletin.com/forum/showt...threadid=30257
          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
          Change CKEditor Colors to Match Style (for 4.1.4 and above)

          Steve Machol Photography


          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


          Comment

          Related Topics

          Collapse

          Working...
          X