User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 455,967 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,741 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1396 | Replies: 2 | Solved
Reply
Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

display table border

  #1  
Nov 23rd, 2007
hi
in this coding i want to specify the table width and border..i tried with css and html both are not working..please tell me how to display the table

<html>
<head></head>
<link rel="stylesheet" type="text/css" href="test.css" />
<body>
<?php
$hostname = "localhost";
$username = "splendor_lydia";
$password = "jesus";
$dbid = "splendor_samp";
$link=mysql_connect($hostname, $username, $password);
mysql_select_db($dbid) or die("unable to connect");

echo "<table>";
$result=mysql_query("SELECT * FROM please");
for ($i = 0; $i < 1; ++$i)
{
$line = mysql_fetch_row($result);
print "<tr><td>Name $line[0]</td></tr>";
print "<tr><td>Company Name $line[1]</td></tr>";
print "<TR><td>Company Address $line[2]</td></tr>";
print "<tr><td>Email Id $line[3]</td></tr>";
print "<tr><td>Skills $line[4]</td></tr>";
print "<tr><td>Degree $line[5]</td></tr>";
print "<tr><td>Industry Type $line[6]</td></tr>";
print "<td>Description $line[7]</td></tr>";
print "<tr><td>Requirement $line[8]</td></tr>";
print "<tr><td>Year Of Experience $line[9]</td></tr>";
print "<tr><td>Salary $line[10]</td></tr>";
print "<tr><td>Search Date $line[11]</td></tr>";
}
echo "</table>";


mysql_close($link);
?>
</body>
</html>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 636
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 71
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Practically a Master Poster

Re: display table border

  #2  
Nov 23rd, 2007
just add the width and border to the <table> tag.

echo "<table width='something' border='1'>";
Reply With Quote  
Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

Re: display table border

  #3  
Nov 23rd, 2007
thanks it is working
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 9:08 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC