Forum Moderators: coopster
Sure that is possible. If you are using mysql you could use mysql_num_rows [ca2.php.net] and then choose whether to have the table or the form. You could probably use a switch actually
$query = mysql_query("select * from table where somecol='someval'");
$numrows = mysql_num_rows($query);
switch ($numrows) {
case 0:
echo "no results";
break;
case 1:
//put results into form
break;
default:
//load results into table
break;
}
or something like that