> Hvilken fejl får du?
<?
include"top.php";
?>
<form action='<?$PHP_SELF?>' method='post'>
<select name='select' size='1'>
<option selected>Choose</option>
<option value='artist'>Artist</option>
<option value='title'>Title</option>
</select>
<input type='text' name='seek'>
<input type='submit' name='seach' value='Seach'>
</form>
<br><br><br>
<?
if (!$_POST[seek] == "" && !$_POST[artist] == "Artist") {
$result = mysql_query("SELECT * FROM cds WHERE artist LIKE
'%".$_POST['seek']."%'") or print mysql_error();
$number = mysql_num_rows($result);
print"Your seach: <b>$_POST[seek]</b> gave $number results"; }
while ($row = mysql_fetch_array($result)) {
print "<b><a href=\"
http://www.din-side.dk/film&id=$row[id]\"
target=\"_blank\">$row[film]</a></b><br>$row[tekst]<br></li>";
}}
elseif (!$_POST[seek] == "" && !$_POST[title] == "title") {
$result = mysql_query("select * from cds where title like
'%$_POST[seek]%'");
$number = mysql_num_rows($result);
print "Your seach: <b>$_POST[seek]</b> gave $number results";
while ($row = mysql_fetch_array($result)) {
print "<b><a href=\"
http://www.din-side.dk/film&id=$row[id]\"
target=\"_blank\">$row[film]</a></b><br>$row[tekst]<br></li>";
}}
elseif ($_POST[seach] == "Seach" && !$_POST[seek] == "") { print "0
results"; }
?>
<?
include"bund.php";
?>
her er hele min kode for siden.
siden findes her:
http://gtb.users.whitehat.dk
der kan du se fejlen.
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials