Hi
How do you write a html table tag with class with modifications in a PHP tag?
Here my code. I keep getting a Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\wamp\www\hp\admin_vendor.php on line echo "<table class="listing" cellpadding="0" cellspacing="0">";.
Note, this is not whole code but only the PHP Tag. If you need the whole code let me know and Ill post it. Another thing, Im using CSS on my html tables.
[code=php] <?php
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("hp") or die(mysql_error());
$sql=mysql_query("SELECT * FROM vendorinfo");
echo "<table class="listing" cellpadding="0" cellspacing="0">";
echo "<tr>";
echo "<td>" Vendor Name "</td>";
echo "<td>" Contact Person "</td>";
echo "<td>" Type "</td>";
echo "<td>" Contact Number "</td>";
echo "</tr>";
while ($row = mysql_fetch_assoc($sql))
{
$vendorname = $row['vendorname'];
$contactperson = $row['contactperson'];
$type = $row['type'];
$contactnumber = $row['contactaddress'];
echo "<tr>";
echo "<td>" $vendorname "</td>";
echo "<td>" $contactperson "</td>";
echo "<td>" $type "</td>";
echo "<td>" $contactaddress "</td>";
echo "</tr>";
echo "</table>";
}
?>[/code]