I verified that the values of the form are being stored correctly.
I commented out everything except what is below:
PHP Code:
<?php
$conn=odbc_connect('Warranty','','');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
echo $myusername;
echo $mypassword;
?>
The values from the form are being carried over.
I then did:
PHP Code:
<?php
$conn=odbc_connect('Warranty','','');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
echo $myusername;
echo $mypassword;
$sql="SELECT * FROM Admins WHERE Username='$myusername' and Password='$mypassword'";
$results= odbc_execute($sql);
$count= odbc_num_rows($results);
echo $count;
?>
But I get nothing but what I typed in the form. I've tried to echo $count and $results but it's the same thing over and over.
$sql appears to be right. It's when I try to echo $results or $count that I get nothing. I've tried chaning $count == from 1 to 2 since I have 2 entries in there and still nothing.
Bookmarks