hmm.. here is how i want it to work, but with search and what i want too is if i look from that previus script is that, if i look with nimi and type just part of a name, it lists all where typed nimi is present.
well, here is it without that seach thing.
<?php
$db = mysql_connect("localhost", "root");
mysql_select_db("mydatabase",$db);
if ($id) {
$result = mysql_query("SELECT * FROM table WHERE id=$id",$db);
$myrow = mysql_fetch_array($result);
printf("%s\n<br>",$myrow["lakana"]);
} else {
// show list
$result = mysql_query("SELECT * FROM table",$db);
if ($myrow = mysql_fetch_array($result)) {
// display list if there are records to display
printf("<h1><b>Tanssit kannassa</b></h1><br>");
do {
printf("<a href=\"%s?id=%s\">%s</a><br>\n", $PHP_SELF, $myrow["id"], $myrow["nimi"], $myrow["hits"]);
} while ($myrow = mysql_fetch_array($result));
} else {
// no records to display
echo "Sorry, no records were found!";
}
}
?>
this will print all from the table and gives it as a link, and when you click it is shows lakana..