Jump to content
Killersites Community
Sign in to follow this  
scampbell70

How Do I Style This?

Recommended Posts

How do I style this table to make it look "prettier" I have tried a little with css and html tags with no luck. 

// display data in table
						        echo "<table border='1' cellpadding='10'>";
						        echo "<tr> <th>ID</th> <th>First Name</th><th>Middle Name</th> <th>Last Name</th><th>Client ID</th><th>Diagnosis</th><th>Gender</th><th>Level of Care</th><th>Counselor</th><th>Active</th><th>Aftercare</th></tr>";
						
						        // loop through results of database query, displaying them in the table 
						        for ($i = $start; $i < $end; $i++)
						        {
						        	// make sure that PHP doesn't try to show results that don't exist
					                if ($i == $total_results) { break; }
					                
						        	// find specific row
						        	$result->data_seek($i);
   	 								$row = $result->fetch_row();
   	 								
   	 								// echo out the contents of each row into a table
					                echo "<tr>";
					                echo '<td>' . $row[0] . '</td>';
					                echo '<td>' . $row[3] . '</td>';
					                echo '<td>' . $row[1] . '</td>';
					                echo '<td>' . $row[2] . '</td>';
					                echo '<td>' . $row[4] . '</td>';
					                echo '<td>' . $row[5] . '</td>';
					                echo '<td>' . $row[7] . '</td>';
					                echo '<td>' . $row[10] . '</td>';
					                echo '<td>' . $row[11] . '</td>';
									echo '<td>' . $row[15] . '</td>';
									echo '<td>' . $row[18] . '</td>';
									echo '<td><a href="records.php?id=' . $row[0] . '">Edit</a></td>';
					                echo '<td><a href="delete.php?id=' . $row[0] . '">Delete</a></td>';
					                echo "</tr>";
						        }

						        // close table>
						        echo "</table>";

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×