[SOLVED] how to find the next record
Posted: Tue Apr 26, 2005 5:43 pm
hello i am trying to create a loginaction page for my login table
here is my code
the part if ($query->recordCount() < 1)
can recordCount() be used with access ODBC??
Regards
feyd | Please review how to post code using
here is my code
Code: Select all
<?php
require_once('odbc.php');
// Main ----------
session_start();
// Get the data collected from the user
$appUsername =$_POST["formUsername"];
$appPassword =$_POST["formPassword"];
//$conn->NConnect($hostName,$username,$password);
// Formulate the query
$sql = "SELECT * FROM User WHERE UserName = '$appUsername'
AND password = '$appPassword' ";
//print $sql;
$query = odbc_exec($odbc, $sql) or die (odbc_errormsg());
//print $query->recordCount();
if ($query->recordCount() < 1)
{
$_SESSION["message"] = "Could not connect as $appUsername " ;
// print $_SESSION["message"];
header("Location: staff.php");
}
else
{
$_SESSION["authenticatedUser"] = $appUsername;
//rint $_SESSION["authenticatedUser"];
// Relocate to the logged-in page
header("Location: simpleQuery.php");
}
?>can recordCount() be used with access ODBC??
Regards
feyd | Please review how to post code using
Code: Select all
andCode: Select all
tags. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]