Hi,
I'm trying to query a database to pull out all results from the database where the location and server responsible are selected from a form on a previous page which are then posted over.
I can manage to post the selections from the form, but when it attempts to query the database for the selected values i get the following error message:
PHP Fatal error: Call to undefined function odbc_results() in D:\web\tivicheck\getinfo.php on line 21
Can anyone tell me why it is doing this?
I'm sure that odbc_results() is defined as i have to use it in the previous page to get the list of names to select to perform the query on the next page once you've selected one.
The code for the page is as follows:
<?php
$conn=odbc_connect('backuplogs','','');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$postlocation = $_POST["t1"];
$postresponsible = $_POST["t2"];
$results="SELECT * FROM BackupLog WHERE
Location = '$postlocation'
AND Responsible = '$postresponsible'";
$rs=odbc_exec($conn, $results);
while (odbc_fetch_row($rs))
{
$location=odbc_results($rs, "Location");
$responsible=odbc_results($rs, "Responsible");
echo $location;
echo $responsible;
}
odbc_close($conn);
?>