Jump to content

Yet again my code echos nothing!


DaveLinger

Recommended Posts

[code]<html>
<body>
<head>
<link href="resultcss.css" rel="stylesheet" type="text/css" />
</head>
<?php
include('config/file.php');

$platform = $_POST['platform'];
$developer = $_POST['developer'];
$publisher = $_POST['publisher'];
$fletter = $_POST['fletter'];
$sortby = $_POST['sort'];
$perpage = $_POST['perpage'];
$order = $_POST['order'];

if (!$link = mysql_connect($sqlserver, $sqlusername, $sqlpassword)) {
  echo 'Could not connect to mysql';
  exit;
}

if (!mysql_select_db($sqldatabase, $link)) {
  echo 'Could not select database';
  exit;
}

if($fletter == '%'){
$query="SELECT * FROM nuke_seccont WHERE secid LIKE '$platform' AND developer LIKE '$developer' AND publisher LIKE '$publisher' ORDER BY $sortby $order";
}ELSE{
$query="SELECT * FROM nuke_seccont WHERE secid LIKE '$platform' AND developer LIKE '$developer' AND publisher LIKE '$publisher' AND fletter='$fletter' ORDER BY $sortby $order";
}
$result = mysql_query($query) or die("Problem with the query: $query<br>" . mysql_error());

mysql_close();

$numberofresults = mysql_num_rows($result);

if($numberofresults == '0'){
echo "No results found matching the criteria specified!";
}else{
echo "<p align=\"left\">Search successful! $numberofresults results found.</p>";
echo "<table width=\"100%\" height=\"100%\"><tr><td>Game Title</td><td>Final Score</td><td>Author</td><td>Platform</td><td>Release Date</td><td>Publish Date</td><td>Hits</td></tr>\"

$i=0;
while ($i < $numberofresults) {

$query2="SELECT * FROM nuke_sections WHERE secid = $platform";
$result2 = mysql_query($query2) or die("Problem with the query: $query2<br>" . mysql_error());

mysql_close();

while ($row = mysql_fetch_array($result2)) {

$section = stripslashes($row["secname"]);

}

$aid=mysql_result($result,$i,"aid");
$artid=mysql_result($result,$i,"artid");
$secid=mysql_result($result,$i,"secid");
$title=mysql_result($result,$i,"title");
$counter=mysql_result($result,$i,"counter");
$score6=mysql_result($result,$i,"score6");
$releasedate=mysql_result($result,$i,"releasedate");
$publishdate=mysql_result($result,$i,"publishdate");

echo "<tr><td>● <a href=\"review.php?artid=$artid\" target=\"_parent\"><b>$title</b></a></td>$score6<td></td><td>$aid</td><td>$section</td><td>$releasedate</td><td>$publishdate</td><td>$counter</td></tr>";

$i++;
}
echo "</table>"
}
?>
</body>
</html>[/code]

echos NOTHING; not even my html tags. What gives!
Link to comment
Share on other sites

note that your second echo command
echo "<table width=\"100%\" height=\"100%\"><tr><td>Game Title</td><td>Final Score</td><td>Author</td><td>Platform .......................

is never ended. You need to end that echo before going on to the rest of the php.
Link to comment
Share on other sites

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.