Jump to content

Recommended Posts

Well when I'm inside the html editor of a page edit I am using single quotes but then after I submit the changes and have it echo out queries for testing it turns the single quotes into backticks. Has this happened to anyone else?

Even when I type this code into the HTML view of the page editor inside of WordPress I still get that problem. The code and link are below.

 

kansasoutlawwrestling.com/roster

 

<div id="roster" class="content">
<h1 class="pageheading">Singles Biographies</h1>
<span class="minilinks"><a href="/roster/tag-team-roster">Tag Teams</a> | <a href="/roster/stable-roster">Stables</a> | <a href="/roster/manager-roster">Managers</a> | <a href="/roster/referee-roster">Referees</a> | <a href="/roster/staff-roster">Staff</a></span>

<?php      
$query = "SELECT 
    characters.shortName, 
    characters.characterName
FROM 
    characters as characters 
    LEFT JOIN singles as singles 
        ON characters.ID = singles.characterID 
WHERE 
    characters.styleID = '1' AND characters.statusID = 1
ORDER BY 
    characters.sortOrder";
$result = mysqli_query ( $dbc, $query );
echo $query;
while ( $row = mysqli_fetch_array ( $result, MYSQL_ASSOC ) ) {
  $fieldarray = array('shortName','characterName');
  foreach ($fieldarray as $fieldlabel) {
      if (isset($row[$fieldlabel])) {
          $fieldlabel = $row[$fieldlabel];
      }
  }
?>

    <div id="wrestler">
        
        <div id="headshot">
        
        <?php 
        if (file_exists('/images/headshots/' . $shortName . '.png')) {
            print '<img src="images/headshots/' . $shortName . '.png">';
        } else {
            print '<img src="images/headshots/default.png">';
        }
        ?>
        
        </div>
        
        <div id="wrestler-info">
        
        <span class="rostername"><a class="biolinks" href="/bio?shortName=<?php echo $shortName;  ?>"><?php echo $characterName; ?></a></span>
        
        </div>
        
    </div>

<?php 
}
?>

</div>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.