Jump to content

Recommended Posts

http://flash-planet.co.cc/BrowseGame.php?category=quiz

 

Some of you will see a link that says "The Impossible Quiz" and people with browsers such as Opera and Chrome can't see it. In IE, 6, 7, 8, the code is all messed up. And its only viewable in firefox. I can't seem to find any solutions to fix this. Can someone fix this for me?

 

Code:

<?php
        require_once('mysql.php');
        mysql_select_db("ruko_fp", $con);

        $thispage = $_SERVER["REQUEST_URI"];
        $category = strstr("$thispage","=");
        $category = substr($category, 1);

        $result = mysql_query("SELECT * FROM games WHERE category LIKE '%$category%'");
        $num_rows = mysql_num_rows($result);
        if($num_rows == 0)
         {
           echo "That was not a valid category.";
           // You can make the above line whatever you wish, it just tells people that no games with that category were found
         }
        else
         {
           while($row = mysql_fetch_array($result))
            {
             echo "<a href=\"ViewGame.php?gid=".$row['gid'].">".$row['gametitle']."</a>";
             // generates a link to each game in this category and inserts a line break each time
            }
          }

        ?>

 

Wait, how do I put the links in my content. See the YELLING areas? How do I replace that with the game in the category

 

Edited file:

        <?php
        require_once('mysql.php');
        mysql_select_db("ruko_fp", $con);

        $thispage = $_SERVER["REQUEST_URI"];
        $category = strstr("$thispage","=");
        $category = substr($category, 1);

        $result = mysql_query("SELECT * FROM games WHERE category LIKE '%$category%'");
        $num_rows = mysql_num_rows($result);
        if($num_rows == 0)
         {
           echo "That was not a valid category.";
           // You can make the above line whatever you wish, it just tells people that no games with that category were found
         }
        else
         {
           while($row = mysql_fetch_array($result))
            {
             echo "<a href=\"ViewGame.php?gid=".$row['gid']."\">".$row['gametitle']."</a>";
         $flashlink = $row['gameswf'];
         $gid = $row['gid'];   
         $gametitle = $row['gametitle'];
         $gamedescription = $row['gamedescription'];
         $gamerating = $row['gamerating'];
         $gamereview = $row['gamereview'];
            }
          }

        ?>
        <head>
   <title>Browsing Category, <?=$category;?></title>
    <meta name="description" content="Browsing Category, <?=$category;?>" />
    <meta name="keywords" content="Game, Fun, Flash" />
    <meta name="author" content="Luigi R." />
    <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
<link rel="icon" type="image/png" href="images/favico.png" />	
<link rel="stylesheet" href="style.css"  type="text/css" media="screen" />
        </head>
<div class ="wrap">
    <? include('announcements.html') ?>
    <? include('logo.html') ?>
    <? include('categories.html') ?>
  <div id='conTOP'>
    <div id='content'>
      <h4>Browsing Game Category, <?=$category;?></h4>
          <table id="summaryTbl">
            <col id="Location" width="100"> 
            <col id="Offer" width="350"> 
            <col id="Points">
              <tr id="gametr1"> 
                  <th id="gameth">Title</th> 
                  <th>Rating</th> 
                  <th>Review</th> 
                  </tr>
              <tr class="summaryTR summaryTR1"> 
	<td><a href="ViewGame.php?gid=GAME ID OF THE CATEGORY">GAME TITLE</a></td>
                <td>GAME RATING</td>				
	<td>GAME REVIEW</td>			
			  </tr> 

 

 

Grr... cant get the edit feature for the topic above me!

 

New edit:

        <?php
        require_once('mysql.php');
        mysql_select_db("ruko_fp", $con);

        $thispage = $_SERVER["REQUEST_URI"];
        $category = strstr("$thispage","=");
        $category = substr($category, 1);

        $result = mysql_query("SELECT * FROM games WHERE category LIKE '%$category%'");
        $num_rows = mysql_num_rows($result);
        if($num_rows == 0)
         {
           echo "That was not a valid category.";
           // You can make the above line whatever you wish, it just tells people that no games with that category were found
         }
        else
         {
           while($row = mysql_fetch_array($result))
            {
         $flashlink = $row['gameswf'];
         $gid = $row['gid'];   
         $gametitle = $row['gametitle'];
         $gamedescription = $row['gamedescription'];
         $gamerating = $row['gamerating'];
         $gamereview = $row['gamereview'];
         $imgsrc = $row['imgsrc'];
            }
          }

        ?>
        <head>
   <title>Browsing Category, <?=$category;?></title>
    <meta name="description" content="Browsing Category, <?=$category;?>" />
    <meta name="keywords" content="Game, Fun, Flash" />
    <meta name="author" content="Luigi R." />
    <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
<link rel="icon" type="image/png" href="images/favico.png" />	
<link rel="stylesheet" href="style.css"  type="text/css" media="screen" />
        </head>
<div class ="wrap">
    <? include('announcements.html') ?>
    <? include('logo.html') ?>
    <? include('categories.html') ?>
  <div id='conTOP'>
    <div id='content'>
      <h4>Browsing Game Category, <?=$category;?></h4>
          <table id="summaryTbl">
            <col id="Location" width="100"> 
            <col id="Offer" width="350"> 
            <col id="Points">
              <tr id="gametr1"> 
                  <th id="gameth">Thumbnail</th> 
                  <th id="gameth">Title</th> 
                  <th id="gameth">Game Rating</th> 
                  </tr>
              <tr class="summaryTR summaryTR1"> 
	<th><img src="<?=$imgsrc;?>"></img></th>
                <th><a href="ViewGame.php?gid=<?=$gid;?>"><?=$gametitle;?></a></th>				
	<th><?=$gamerating;?></th>			
			  </tr> 

 

How will I let the SQL add multiple rows?

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.