newbie error


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

what is wrong with this code ?

<html>
<body>
Did you know?Explore Trending and Topic pages for more stories like this.

<?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

Creating web pages by php
Hello again,
I was just wondering us there a way to use a php script to create a new web page. I

Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

How to generate a text file using php...?
Hi,
Can anyone give me code to generate a text file using php


Thanks in advance

How to get exact 3 moths post date from today date using javascript
How to get exact 3 moths post date from today date using javascript
Please help

storing video files into mysql in php
hi

i have my video files in my folder ,
i have to store the path of the videos into db an

Help on query replacing the date
Hi Pals,

i want to replace the current date in a column to some value say C or D or any n

How to make URL loads only on login
On my page, when a user login he's redirects to user_home.php. I made it also to open the chat scree

quick basic question, hopefully not dumb
I don't know how to search for this, so forgive me if it's been covered...

I often see an exa

problem in program for counting no of chars using pointers
Hi all, I was trying to make a program which counts number of chars in a string using concpt of poin

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