newbie error


Posted on 16th Feb 2014 07:03 pm by admin

what is wrong with this code ?

<html>
<body>

<?php
$conn=odbc_connect('Towel','','');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$sql="SELECT * FROM Towel";

$rs=odbc_exec($conn,$sql);
if (!$rs)
{exit("Error in SQL");}
echo "<table><tr>";
echo "<th>ProductID</th>";
echo "<th>Name</th></tr>";
echo "<th>Dimensions</th></tr>";
echo "<th>Weight</th></tr>";
echo "<th>Color</th></tr>";

while (odbc_fetch_row($rs))
{
$ProductID=odbc_result($rs,"ProdcutID");
$Name=odbc_result($rs,"Name");
$Dimensions=odbc_result($rs,"Dimensions");
$Weight=odbc_result($rs,"Weight");
$Color=odbc_result($rs,"Color");

echo "<tr><td>$ProdcutID</td>";
echo "<td>$Name</td></tr>";
echo "<tr><td>$Dimensions</td>";
echo "<td>$Weight</td></tr>";
echo "<tr><td>$Color</td>";
}
odbc_close($conn);
echo "</table>";
?>

</body>
</html>

the file just doesn't show anything in Internet Explorer

No comments posted yet

Your Answer:

Login to answer
131 Like 24 Dislike
Previous forums Next forums
Other forums

Save User Inputs while javascript reloading!
hi..
i have written a PHP code in which i reload the page when user selects a value in dropdown..

Is there a quick way to do this?
Hi all,

I need to create a mysql table from php that goes a little something like this

Need Reporting Advice
My SQL server doesn't support MS SQL reporting services that comes with SQL Enterprise or Express. T

limitations on array_unique()
Does any one know what/how imitations are applied to array_unique? I have an issue where no matter h

Echo multiple lines of html code
Hi guys,

I would like to know if there is a way to echo multiple lines of html codes.

PHP Mysql Staff Induction System
Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right directi

Not showing whole name with mail () script
I sent up a simple mail form with the PHP mail() script. One problem is when it sends an email with

cstdatomic (c++0x std::atomic) / g++ 4.4
Hello,

I'm trying to use cstdatomic (std::atomic in the upcoming c++0x standard) in g++

Saving data from a form into a file
Hey everybody,

Sorry, I am really new to PHP coding and such but a project kind of got thrust

Join Query Help
Hi all,

I am having problems with the below code, which we shall call 'my first join query'!

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash