Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress Working With Outside Custom CMS

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32207
    PokerAcesKid
    Member

    Okay so I created a theme for my website that will also utilize a custom CMS script I developed and its not cooperating with me nicely.

    Here’s my head of my header file for my template:


    >

    <?php bloginfo('name') ?>: <?php bloginfo('description') ?>

    ' />



    Now on my index page that calls the header file I DO NOT get a error saying that the file could not be located. So that’s good news. Here’s my dbconfig.php file.



    /**
    * @author Jeff Davidson
    * @copyright 2010
    */

    // This file contains the database access information and establishes a connection to MySQL and selects the database

    // Set the database access information as contstants

    DEFINE ('DB_USER', '?');
    DEFINE ('DB_PASSWORD', '?');
    DEFINE ('DB_HOST', '?');
    DEFINE ('DB_NAME', '?');

    // Make the database connection

    $dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

    if (!$dbc) {
    die('Connect Error (' . mysqli_connect_errno() . ') '
    . mysqli_connect_error());
    }

    ?>

    Now when I go to one of my custom pages like this one it brings up the message:

    Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/xtremer/public_html/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 38

    Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in /home/xtremer/public_html/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 39



    KOW Champions and Contenders



    $championsQuery = "
    SELECT
    titles.titleName,
    titles.shortName,
    champions.champID,
    champions.con1ID,
    champions.con2ID,
    champions.con3ID,
    biochamp.shortName AS championshortName,
    biochamp.characterName AS champion,
    biocon1.shortName AS con1shortName,
    biocon1.characterName AS con1,
    biocon2.shortName AS con2shortName,
    biocon2.characterName AS con2,
    biocon3.shortName AS con3shortName,
    biocon3.characterName AS con3
    FROM
    champions
    LEFT JOIN titles AS titles
    ON titles.ID = champions.titleID
    LEFT JOIN characters AS biochamp
    ON champions.champID = biochamp.ID
    LEFT JOIN characters AS biocon1
    ON champions.con1ID = biocon1.ID
    LEFT JOIN characters AS biocon2
    ON champions.con2ID = biocon2.ID
    LEFT JOIN characters AS biocon3
    ON champions.con3ID = biocon3.ID
    WHERE
    titles.statusID = '1'
    ORDER BY
    titles.ID";
    $championsResult = mysqli_query($dbc, $championsQuery);
    while ( $row = mysqli_fetch_array ( $championsResult, MYSQLI_ASSOC ) ) {
    $fieldarray=array('titleName','shortName','championID','championshortName','champion','con1ID','con1','con1shortName','con2ID','con2','con2shortName','con3ID','con3','con3shortName');
    foreach ($fieldarray as $fieldlabel) {
    ${$fieldlabel} = $row[$fieldlabel];
    }
    ?>

    < ?php echo $titleName ?> 

    < ?php
    if (file_exists('images/championshots/'.$titleshortName.'/'.$championshortame.'.png')) {
    echo "/n";
    } else {
    echo "/n";
    }

    if (strlen ($champion) < 1) {
    echo "Vacant";
    } else {
    echo "".$champion."n";
    echo "(Since TBD)";
    }
    ?>

    Contenders

       

      < ?php
      if ( strlen ($con1) < 1) {
      echo "
    • TBD";
      } else {
      echo "
    • ".$con1."
    • n";
      }

      if (strlen ($con2) < 1) {
      echo "
    • TBD";
      } else {
      echo "
    • ".$con2."
    • n";
      }

      if (strlen ($con3) < 1) {
      echo "
    • TBD";
      } else {
      echo "
    • ".$con3."
    • n";
      }

      ?>





    < ?php
    }
    ?>

    #52279
    PokerAcesKid
    Member

    Anybody have any ideas on why this is happening?

    #51645
    PokerAcesKid
    Member

    *bump*

    #51533
    PokerAcesKid
    Member

    Is there anyone that knows?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.