PDA

View Full Version : Dreamweaver MX 2004: results php page


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);
?>

degsy
August 10th, 2004, 03:23 PM
Welcome :)

Did you write all the code with DW?

Have you tried POST instead of GET?

Coriolan
August 10th, 2004, 09:46 PM
I tryed both POST and GET so far. The GET method is suitable for queries like mine. I continuing ask for help in many forums.

http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=189&threadid=873439

If you can help, I can give the code for you. I made accurate checking of all connections ( I made new ones, just in case....).

Is there some templates I can adjust for my MySQL database, instead doing everything for myself?

Thank you.