i have an html page and a php page which is a part of the html one. and they are supposed to do an extremely simple type of searching. when i click on submit i see nothing on my php page.
it probably has nothing to do with my code, but here they're:
search.html
...
<FORM ACTION ="results.php" METHOD="POST">
Enter something:
<BR>
<INPUT NAME="name" TYPE=TEXT>
<BR>
<INPUT TYPE=SUBMIT VALUE="search">
...
results.php
<HTML>
<HEAD>
<TITLE>Search results</TITLE>
</HEAD>
<BODY>
<?
$db = mysql_connect("localhost", "......", ".........");
mysql_select_db("my_db", $db);
$query = "select my_table.tune, my_table.year
from my_table where name like '%".$name."%'";
$result = mysql_query($query);
while ($audio = mysql_fetch_assoc($result)) {
while (list($fieldname, $fieldvalue) = each ($audio)) {
echo $fieldname.": <B>.$fieldvalue."</B><BR>";
}
echo "<BR>";
}
?>
</BODY>
</HTML>
the reason why i say it's probably not from the coding is that my code is taken from a working tutorial.
i absolutely don't know what to do. i did search and read through like 3-4 pages and found some good posts but not my case.
i'm using PHP 4, Apache 1.3.xx and mySQL 4.1.xx