Cześć jestem Franek
Wyszukiwarka miałaby szukać po tabeli i określonym polu fraze wybrana z listy select
cuś napisałem:
<form action="search.php" method="post">
<select name="impreza"><option value="impreza1">impreza 1</option><option value="impreza2">impreza 2</option></select><BR />
<select name="miejsce"><option value="dyskoteka">dyskoteka</option><option value="pub">pub</option></select><BR />
<select name="termin"><option value="06_07">VI 07</option><option value="07_07">VII 07</option></select><BR />
<input type="submit" value="szukaj">
</form>
<? if (!$impreza || !$miejsce || !$termin)
{
print "Wypelnij wszystkie pola"; }
if (!$db)
{
print "blad w polaczeniu"; }
$query = " select * from jakastabela ".$impreza." and ".$miejsce." and ".$termin.";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
print "<p>Ilosc znalezionych fraz : " .$num_results."</p>";
for ($i=0; $i <$num_results; $i++) {
$row = mysql_fetch_array($result);
print ($i+1).". ";
print stripslashes($row["header"]); print ", naglowek: ";
print stripslashes($row["header2"]);
print " tresc ,data:";
print stripslashes($row["termin"]);
print "<BR />";
}
?>
wyskakuje Parse error: parse error, unexpected '\"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /www/search.php on line 27
helpy
Ten post edytował dekoder 1.06.2007, 08:45:41