Page 2 of 2

Posted: Tue Sep 21, 2004 6:15 pm
by Weirdan
and here's what should work for you:

Code: Select all

<?php require_once('../../Connections/hungryusaconnection.php'); ?>
<?php
$colname_rsmenu = "1";
if (isset($HTTP_GET_VARS['namefield'])) {
  $colname_rsmenu = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['namefield'] : addslashes($HTTP_GET_VARS['namefield']);
}
mysql_select_db($database_hungryusaconnection, $hungryusaconnection);
$query_rsmenu = sprintf("SELECT * FROM menus WHERE item LIKE '%%%s%%' ORDER BY item ASC", $colname_rsmenu);
$rsmenu = mysql_query($query_rsmenu, $hungryusaconnection) or die(mysql_error());
$row_rsmenu = mysql_fetch_assoc($rsmenu);
$totalRows_rsmenu = mysql_num_rows($rsmenu);
//mysql_free_result($rsmenu);
?>
<?php 
do 
{
//$row_rsmenu ++; 
print( '<p style="color: #000000">' ); 
print( $row_rsmenu ['item' ]. '<p>' ); 
}
while ( $row_rsmenu =mysql_fetch_assoc ($rsmenu )); 
?>
note which lines are commented

Posted: Tue Sep 21, 2004 6:44 pm
by saltriver
That produced this error

Code: Select all

Parse error:  parse error in /home/virtual/site110/fst/var/www/html/testing/middle/name_results.php on line 5

Posted: Tue Sep 21, 2004 6:59 pm
by Weirdan
it should be copy-paste error, make sure you copied source code properly. There's no syntax errors in the code I posted.

Posted: Wed Sep 22, 2004 3:20 pm
by saltriver
Boo-Ya!
There were two "E"s infront of one of the tabbed lines.

Thanks