I want to show users the number of records on the database.
I have this on my html page:
How many ships are listed ?
<form action="rowcount.php" method="post" target="_blank"><input type="submit" value="Answer here" /> </form>
with about 8,000 names.
and this :
<?php
require_once 'dbconnect.php';
$query="SELECT COUNT(name1) FROM allnames";
$result = mysql_query($query);
if (!$result) die ("Database access failed: " . mysql_error());
while($row=mysql_fetch_array($result))
{
echo "<table border='1' width='75' height='20'/>";
echo "<tr><td>";
echo "<h1>".$row['COUNT(name1)']."</h1>";
echo "</td></tr>";
echo "</table>";
echo "with some 8,000 different names";
}
?>
I want to position the result just after the submit button within the accompanying text.
Any ideas, please ?