i want to disply the database content on webbrowser . The program writeen syntax free but it can not display anything on web browser
why ?
i can use the MS Access 2000 database
plz help me
code is ..
#!usr/bin/perl
use Win32::OLE;
use Win32::OLE::Const 'Microsoft ActiveX Data Objects';
$table = "emptable";
$conn = Win32::OLE->new("ADODB.Connection");
$rs = Win32::OLE ->new("ADODB.Recordset");
$conn->Open("emptable");
print "Content-type:text/html \n\n";
print "<div align = center> <font face = verdana color=#333399 size = 5> Address Book </font><br><br>";
print "<table bgcolor =lightyellow><tr><th width=150 align = left>First Name</th>";
print "<th width = 150 align= left>Last Name</th><th width=150 align=left>Address</th></tr>";
$sql = "select firstname,lastname, address from $table";
$rs->Open($sql,$conn,1,1);
while(! $rs->EOF)
{
$firstname = $rs->Fields('firstname')->value;
$lastname = $rs->Fields('lastname')->value;
$address = $rs->Fields('Address')->value;
print "<tr><td>$firstname</td><td>$lastname</td><td>$Address</td></tr>";
$rs->MoveNext;
}
print "</table></div>";
$rs->Close;
$conn->Close;