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

Probably a simple error...
I'm getting the error -- Parse error: syntax error, unexpected '{' in /home/content/c/s/t/csteffen24

Search function
I am looking for some guidance from the experts.

I am trying to create a search function. It

Detail Expenses Report by Cost Center
I would like to obtain a report out of SAP that shows a list of expenses by cost center that shows t

Find current logon time
Hi,
in my sql script i want to query and find out the logon time of the current session.
<

Table colours fail when extra row added
Hey Gurus,

I got a weird problem with formating the colour of a table made in php. Everything

Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the

Strange PHP/mySQL error ... am I just tired?
Code: <?

## CONNECT TO DB FUNCTION!
function ConnectTo($db2con)
{
$hostNam

Echo Tweaking help!
HI. I would like to have the output of the entered variables repeat forever, but it's stopping at th

Hardcopy printing is to wide
I want to make a hardcopy at runtime of my active form like this

upload image name with extension using php
hi frds..

<input id="file1" type="file" name="file[]" &a

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