MedtronicVascSR
asked on
PHP Undefined variable: odbc_close.... Fatal error: Function name must be a string....
The following code:
<table border="1">
<script language="php">
$ds = odbc_connect("myTest", "", "");
$shortlist = odbc_do($ds, "
SELECT *
FROM shortlist;
");
while(odbc_fetch_row($shor tlist)) {
$lname = odbc_result($shortlist, 1);
$fname = odbc_result($shortlist, 2);
$email = odbc_result($shortlist, 3);
print("
<tr>
<td>$fname</td>
<td>$lname</td>
<td>$email</td>
</tr>
");}
$odbc_close($ds);
</script>
</table>
Gives me the following errors:
Notice: Undefined variable: odbc_close in c:\webroot\myTest\index.ph p on line 26
Fatal error: Function name must be a string in c:\webroot\myTest\index.ph p on line 26
If I omit odbc_close (comment it out), the code executes just fine. But it doesn't solve the problem of the fact that the function is not performing the way I think it's supposed to. Perhaps this is an installation issue? I just installed PHP and am using on this machine for the first time - Windows XP Pro.
Thanks in advance!
Regards,
Carlos
<table border="1">
<script language="php">
$ds = odbc_connect("myTest", "", "");
$shortlist = odbc_do($ds, "
SELECT *
FROM shortlist;
");
while(odbc_fetch_row($shor
$lname = odbc_result($shortlist, 1);
$fname = odbc_result($shortlist, 2);
$email = odbc_result($shortlist, 3);
print("
<tr>
<td>$fname</td>
<td>$lname</td>
<td>$email</td>
</tr>
");}
$odbc_close($ds);
</script>
</table>
Gives me the following errors:
Notice: Undefined variable: odbc_close in c:\webroot\myTest\index.ph
Fatal error: Function name must be a string in c:\webroot\myTest\index.ph
If I omit odbc_close (comment it out), the code executes just fine. But it doesn't solve the problem of the fact that the function is not performing the way I think it's supposed to. Perhaps this is an installation issue? I just installed PHP and am using on this machine for the first time - Windows XP Pro.
Thanks in advance!
Regards,
Carlos
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:=)
ASKER
Regards,
Carlos