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

131 Like 24 Dislike
Previous php-forum Next php-forum
Other php-forum

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

Quick variable question
hey guys/gals,
im trying to write a php script and it works fine as i have it, but i need to set

pop3 and fsockopen
So I am able to connect to the pop3 server, log in, and check how many messages there are. I am hav

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

Quick Question about echo value
Hey guys, I'm trying to get something to show differently in one of my scripts. I'm trying to make

Combining Two Queries
I have two scripts that each work fine by themselves. One is a search script with a variable that de

Undefined variables
hi
----------------------------------------------------------------------------------------------

php form help
Hey,

I use a control file to set my meta tags and titles

Here's an example
Code: &a

Help pulling in 'id' with "read more" link
I'm trying to create snippets of my articles in the cms I'm creating, and then have them redirect to

need help in mysql_num_rows()
please tell me what i am doing wrong in this query. it displays this error

Code: Warning: mys

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