Re: I need the PHP code to display in the proper place in a table
Hi Thanks for the reply
As you said i am able to get the data into the table but i need it in a format as i explained above
<html>
<head><title>Your Page Title</title></head>
<body>
<?php
$database="ginsoft";
mysql_connect ("localhost", "root", "");
@mysql_select_db($database) or die( "Unable to select database");
$result = mysql_query( "SELECT * FROM movie LIMIT 10" )
or die("SELECT Error: ".mysql_error());
$num_rows = mysql_num_rows($result);
print "There are $num_rows records.<P>";
print "<table width=400 border=1>";
while ($get_info = mysql_fetch_row($result)){
print "<tr>";
foreach ($get_info as $field)
print "<td><font face=arial size=1/>$field</font></td>";
print "</tr>";
}
print "</table>";
?>
</body>
</html>
When i use the above code i am able to get the data from the table to the screen
But how can i get it in the exact place?
If you can correct my query that would be a great help
Thanks again
|