Hi Friends,
I am back with another question on the webmasterworld.
I am working on a project where i need to created a ticketing information with multiple attributes. of course MYSQL database is ready but now I need the data to be projected on a template which is powered by HTML code but, I want to fetch this data using PHP & MYSQL Command.....As a sample I have created a DB as below
namefav_colorfav_foodpet
RosePink Tacos Cat
BradleyBlue PotatoesFrog
MarieBlack PopcornDog
AnnOrange Soup Cat
$data = mysql_query("SELECT * FROM $tbl_name")
or die(mysql_error());
Print "<table border cellpadding=3>";
while($info = mysql_fetch_array( $data ))
{
Print "<tr>";
Print "<th>name:</th> <td>".$info['name'] . "</td> ";
Print "<th>pet:</th> <td>".$info['pet:'] . " </td></tr>";
}
Print "</table>";
?>
But when I use the above code on the data to read using PHP I get results as below:
Name:RosePet:Cat
Name: Bradleypet:Frog
Name:Mariepet:Dog
Name:Annpet:Cat
But I want it to project the data on the template as is of first table
On the point 2: I want only 3o rows to be displayed in each page so, I need a code to auto generate multiple pages for this data.
Thanks in advance!
Regards,
Naveen