How do i make this script pull out the whole row and not just one field?
<html>
<body>
<?
if ($REQUEST_METHOD=="POST") {
# double-up apostrophes
$textfield = str_replace("'","''",$textfield);
$query = "SELECT * FROM name WHERE namefirst LIKE '$textfield%'";
$result = mysql_query($query)
or die("Query failed");
/ fetch rows in reverse order /
for ($i = mysql_num_rows($result) - 1; $i >= 0; $i--) {
if (!mysql_data_seek($result, $i)) {
echo "Cannot seek to row $i\n";
continue;
}
if(!($row1 = mysql_fetch_object($result)))
continue;
echo "$row1->namefirst <br />\n";}
mysql_free_result($result); }
?>
<form name="form1" method="post" action="search1.php">
<input type="text" name="textfield">
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>