Ruko Posted April 19, 2010 Share Posted April 19, 2010 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 } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/198970-my-php-category-system-not-supported-in-many-browsers/ Share on other sites More sharing options...
-Karl- Posted April 19, 2010 Share Posted April 19, 2010 Try... echo "<a href=\"ViewGame.php?gid=".$row['gid']."\">".$row['gametitle']."</a>"; Quote Link to comment https://forums.phpfreaks.com/topic/198970-my-php-category-system-not-supported-in-many-browsers/#findComment-1044404 Share on other sites More sharing options...
-Karl- Posted April 19, 2010 Share Posted April 19, 2010 Or you could even try this if the above doesn't work: echo "<a href=\"ViewGame.php?gid={$row['gid']}\">{$row['gametitle']}</a>"; Quote Link to comment https://forums.phpfreaks.com/topic/198970-my-php-category-system-not-supported-in-many-browsers/#findComment-1044406 Share on other sites More sharing options...
Ruko Posted April 19, 2010 Author Share Posted April 19, 2010 Try... echo "<a href=\"ViewGame.php?gid=".$row['gid']."\">".$row['gametitle']."</a>"; It works now, thanks m8. Quote Link to comment https://forums.phpfreaks.com/topic/198970-my-php-category-system-not-supported-in-many-browsers/#findComment-1044408 Share on other sites More sharing options...
Ruko Posted April 19, 2010 Author Share Posted April 19, 2010 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> Quote Link to comment https://forums.phpfreaks.com/topic/198970-my-php-category-system-not-supported-in-many-browsers/#findComment-1044413 Share on other sites More sharing options...
Ruko Posted April 19, 2010 Author Share Posted April 19, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/198970-my-php-category-system-not-supported-in-many-browsers/#findComment-1044420 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.