| | |
display table border
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Nov 2007
Posts: 183
Reputation:
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>
just add the width and border to the <table> tag.
PHP Syntax (Toggle Plain Text)
echo "<table width='something' border='1'>";
![]() |
Similar Threads
- How to display a table on windows application in c# (C#)
- display:block to show a table? (JavaScript / DHTML / AJAX)
- 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
| Thread Tools | Search this Thread |
# 5.2.10 alexa apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date directory display dissertation dropdown dynamic echo echo$_get[x]changingitintovariable... email encode error fairness file files folder form forms function functions google href htaccess html image images include indentedsubcategory insert ip javascript joomla legislation limit link local login mail memberships menu mlm multiple multipletables mysql mysqlquery newsletters oop open paypal pdf persist php problem provider query radio random recursion remote rss script search server sessions sms sockets source space spam sql syntax system table tutorial update upload url validator variable video web youtube






