Author Topic: newbie error  (Read 997 times)

0 Members and 1 Guest are viewing this topic.

Offline Quantum1982Topic starter

  • Irregular
  • Posts: 11
    • View Profile
newbie error
« on: December 20, 2009, 07:36:56 AM »
the web page displays nothing ?

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

In internet explorer

Offline Mchl

  • Staff Alumni
  • Freak!
  • *
  • Posts: 8,582
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • FlingBits
Re: newbie error
« Reply #1 on: December 20, 2009, 07:57:37 AM »
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading