Hi, I have a already designed web page with tables and stuff, but there are challenges for me to insert or include php and inserting the data that is from mysql to the tables in the webpage. I do not know how to do it to maintain the integrity of CSS.

I have include the html codes below and if someone could let me know where should i place the php coding to connect to the database and how to display the datas in the table without sacrificing the looks of the page.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Text Processing</title>
<link rel="stylesheet" type="text/css" href="scripts\mainstyle.css">
</head>
<body>
<div id="nav">
Text Processing System
</div>

<div id='maintab'> 
<ul> 
<li><a href='user.htm'>User Profile</a></li> 
<li><a href='upload.htm'>Upload</a></li> 
<li><a href='history.htm' class='active'>Upload History</a></li> 
</ul> 
</div> 
<div id='content'>
<table class="distable" border="1">
  <tr>
    <td width="100"><strong>Upload Date</strong></td>
    <td><strong>File Name</strong></td>
    <td width ="100"><strong>Processing Time</strong></td>
    <td width="30"><strong>View</strong></td>
    <td width="30"><strong>Delete</strong></td>

  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td width="30"><img src="images\preview.png" width="20" /></td>
    <td width="30"><img src="images\cross2.png" width="20" /></td>
  </tr>
   <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td width="30"><img src="images\preview.png" width="20" /></td>
    <td width="30"><img src="images\cross2.png" width="20" /></td>  
    </tr>
   <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td width="30"><img src="images\preview.png" width="20" /></td>
    <td width="30"><img src="images\cross2.png" width="20" /></td>
     </tr>
</table>

</body>
</html>

php code can be embeded anywhere in your page u need

<?php
//in begniing of page you can get values from server and databaase
$var1="somevalue"
?>


<html>
Value is <?php echo $var1; ?>
</html>

Thanks urtruvedi.. Got what you mean now. Much help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.