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

updating a single value to multiple non consecutive rows
I need to update the same value to multiple non consecutive rows. I need to add an experation date t

Open browser page depending on XML results
Hello,

I have some PHP code that sends webbased from data to an external url ( in the form of

What's wrong with my code
sobbing for many days, still don't know why please Help. Why my page isn't posted correctly. In a

Variable Clash
In the past I've had variables clash. For example:

Code: <?php
$c = 5;
$ca

How to make a mail Form secure?
I want to create an email Form on my web site. How can I make the Form secure so the submitted info

Apple's revamped lineup arrives

I'm personally curious about the magic mouse.. a multi-touch concept sounds like it could be nea

Including calander to page - will not show other months than current??
im trying to add an existaing calander onto a profile page by using Code: <?php include "

How to add an image/C++ OpenGL?
Hi,

I have been trying to look online for this and, so far, I haven't found anything usef

Hyperlink in PHP to MySQL record
Hello,

I am having trouble as i am new to php. I have connected to the database and I have di

help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me pu

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