changing this script so it shows fields in table

hi guys i just want this code to show in a table but im new to this and dont kno what to change

please help thank you

please

<html>
<head>
<title>Get  Data</title></head>
<body>
<?php
$conn = @mysql_connect ( "localhost", "ewood", "woodie")
			or die ( "Err:Conn" );

$rs = @mysql_select_db ( "ewood", $conn )
			or die ( "Err:Db" );

$sql="select criminalID, firstName, lastName, age, offence, sentence, fingerprint, free from criminal_details";
$rs = mysql_query( $sql,$conn );
while( $row = mysql_fetch_array( $rs) )
{
	echo( "criminalID: " . $row["criminalID"] ) ;
	echo( " - firstName: " . $row["firstName"] ."<br>" ) ;
	echo( " - lastName: " . $row["lastName"] ."<br>" ) ;
	echo( " - address: " . $row["address"] ."<br>" ) ;
	echo( " - age: " . $row["age"] ."<br>" ) ;
	echo( " - offence: " . $row["offence"] ."<br>" ) ;
	echo( " - sentence: " . $row["sentence"] ."<br>" ) ;
	echo( " - fingerprint: " . $row["fingerprint"] ."<br>" ) ;
	echo( " - free: " . $row["free"] ."<br>" ) ;
}

?>
</body></html>

ADMIN EDIT: Put CODE in phpbb CODE tags for readability

If all you are looking to do is put it in a TABLE format, that’s not so much PHP as it is HTML.

Have a look at http://www.w3.org/TR/html401/struct/tables.html for guidance on the TABLE tags in html.

Have a look at my script in my thread “Script to modify records.” That uses a tables to display data. That may get you started. Also, if that is your real login information, I would suggest getting out of the habit of posting that. Somebody told me that the first time I posted. (At least the username and password.) That will rarely be important when people help you with your question.

Sponsor our Newsletter | Privacy Policy | Terms of Service