| 
	
 | 
 Posted by patrick_woflian on 03/12/06 19:16 
Hey, i have set up a website which allows users to search for other 
members. This code is in php and works fine, however.. to make the 
layout more attractive i was thinking of using html code segments to 
position the results in a table for example. Here is the php code, any 
ideas how to make the layout more attractive???? 
 
<?php 
$connection = mysql_connect("sentinel.cs.cf.ac.uk","scm5sjc", 
"MyPasswordGoesHere"); 
 
mysql_select_db("sjcdb",$connection) or die("failed!"); 
 
$result = mysql_query("SELECT * FROM info", $connection); 
 
while($row = mysql_fetch_row($result)) { 
 
	$title = $row[1]; 
	$first = $row[2]; 
	$last = $row[3]; 
	$age = $row[4]; 
	$subject = $row[5]; 
	$initial=$row[6]; 
	$email=$row[7]; 
 
for ($i=0; $i<mysql_num_fields($result); $i++) print $row[$i]." "; 
echo "\n"; 
print $title." "; 
print $first_name." "; 
print $last_name ." "; 
print $age ." "; 
print $subject." "; 
print $initial." "; 
print $email." "; 
 
} 
 
mysql_close($connection); 
?> 
 
Cheers  
Steven
 
[Back to original message] 
 |