Coriolan
August 10th, 2004, 02:49 PM
This is a persistent problem. The query page goes to the result page, but no records are displayed. Many people already complaint about
--------------------------------------
(http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=189&threadid=642717&highlight_key=y&keyword1=results%20page (http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=189&threadid=642717&highlight_key=y&keyword1=results%20page))
-----------------------------------
So, my case is:
1- I have a list of records
http://www.gamesofcoriolan.org/list.php (http://www.gamesofcoriolan.org/list.php)
2- I have a query page with submit button, wich tested well
http://www.gamesofcoriolan.org/listmenu.php (http://www.gamesofcoriolan.org/listmenu.php)
3- i have the results page wich shows up after the submit button pressed, but displays no results!
http://www.gamesofcoriolan.org/results.php (http://www.gamesofcoriolan.org/results.php)
4- Please help me on this. The code for this last page is...
<?php require_once('Connections/connect.php'); ?>
<?php
$colname_Recordset1 = "1";
if (isset($_GET['country'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['country'] : addslashes($_GET['country']);
}
mysql_select_db($database_connect, $connect);
$query_Recordset1 = sprintf("SELECT * FROM airliners WHERE country = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $connect) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="200" border="1">
<tr>
<th scope="col">code</th>
<th scope="col">model</th>
<th scope="col">airliner</th>
<th scope="col">country</th>
<th scope="col">url</th>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['code']; ?></td>
<td><?php echo $row_Recordset1['model']; ?></td>
<td><?php echo $row_Recordset1['airliner']; ?></td>
<td><?php echo $row_Recordset1['country']; ?></td>
<td><?php echo $row_Recordset1['url']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
--------------------------------------
(http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=189&threadid=642717&highlight_key=y&keyword1=results%20page (http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=189&threadid=642717&highlight_key=y&keyword1=results%20page))
-----------------------------------
So, my case is:
1- I have a list of records
http://www.gamesofcoriolan.org/list.php (http://www.gamesofcoriolan.org/list.php)
2- I have a query page with submit button, wich tested well
http://www.gamesofcoriolan.org/listmenu.php (http://www.gamesofcoriolan.org/listmenu.php)
3- i have the results page wich shows up after the submit button pressed, but displays no results!
http://www.gamesofcoriolan.org/results.php (http://www.gamesofcoriolan.org/results.php)
4- Please help me on this. The code for this last page is...
<?php require_once('Connections/connect.php'); ?>
<?php
$colname_Recordset1 = "1";
if (isset($_GET['country'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['country'] : addslashes($_GET['country']);
}
mysql_select_db($database_connect, $connect);
$query_Recordset1 = sprintf("SELECT * FROM airliners WHERE country = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $connect) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="200" border="1">
<tr>
<th scope="col">code</th>
<th scope="col">model</th>
<th scope="col">airliner</th>
<th scope="col">country</th>
<th scope="col">url</th>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['code']; ?></td>
<td><?php echo $row_Recordset1['model']; ?></td>
<td><?php echo $row_Recordset1['airliner']; ?></td>
<td><?php echo $row_Recordset1['country']; ?></td>
<td><?php echo $row_Recordset1['url']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>