PhP/MySQL Search Results code
| From: | Robb Kerr | Date: | Mon, 27 Oct 2003 14:55:44 +0000 |
| Subject: | PhP/MySQL Search Results code | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-167725@lists.php.net to get a copy of this message | ||
Newbie question - please excuse. I'm using Dreamweaver to generate most of
my PhP. I have created a search page and am trying to generate the results
page. The search form is using the GET function and the form field name is
"manufacturer". The following code is generated by DW in the results
page...
<?php
$vManufacturer_rs_RobesonResultsList = "Reece";
if (isset(manufacturer)) {
$vManufacturer_rs_RobesonResultsList = (get_magic_quotes_gpc()) ?
manufacturer : addslashes(manufacturer);
}
mysql_select_db($database_VandyDivAddresses, $VandyDivAddresses);
$query_rs_RobesonResultsList = sprintf("SELECT robeson_inv.manufacturer,
robeson_inv.model, robeson_inv.specs, robeson_inv.qty FROM robeson_inv
WHERE robeson_inv.manufacturer = '%s' ORDER BY robeson_inv.model",
$vManufacturer_rs_RobesonResultsList);
$rs_RobesonResultsList = mysql_query($query_rs_RobesonResultsList,
$VandyDivAddresses) or die(mysql_error());
$row_rs_RobesonResultsList = mysql_fetch_assoc($rs_RobesonResultsList);
$totalRows_rs_RobesonResultsList = mysql_num_rows($rs_RobesonResultsList);
?>
I'm always getting an error when testing the page. The error is...
Parse error: parse error, expecting
T_VARIABLE' or '$'' in
/home/s/k/user992816/html/RobesonWeb/TMP4np9nf7zp.php on line 4
The line to which it refers is the line stating,
"$vManufacturer_rs_RobesonResultsList = (get_magic_quotes_gpc()) ?
manufacturer : addslashes(manufacturer);"
Anyone know what the problem may be?
Thanx in advance for any help provided,
Robb Kerr
Digital IGUANA
Helping Digital Artists Achieve their Dreams
http://www.digitaliguana.com
http://www.cancerreallysucks.org