•
•
•
•
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
![]() |
•
•
Join Date: Nov 2007
Posts: 183
Reputation:
Rep Power: 2
Solved Threads: 5
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>
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>
•
•
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 636
Reputation:
Rep Power: 3
Solved Threads: 71
just add the width and border to the <table> tag.
echo "<table width='something' border='1'>";
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- display:block to show a table? (JavaScript / DHTML / AJAX)
- How to display a table on windows application in c# (C#)
- php table help (PHP)
- Display Search Results as Hyperlinks to Records (ASP)
- h2 bottom border not budging (HTML and CSS)
- Help with asp form will not display contact information (ASP)
- CSS -- table border and table header color (HTML and CSS)
- html table to .csv (HTML and CSS)
Other Threads in the PHP Forum
- Previous Thread: Broken Script
- Next Thread: parse error


Linear Mode