My script seems to be unable to
read from my db..
If you find where the fault
is, please tell me, here´s the script:
<?php
if (!isset($doCheck))
{
?>
<head><title>Logintest</title></head>
<body>
<form method="post" action= <? $php_self ?>>
<input type="hidden" name="doCheck" value="1">
<input type="textfield" name="name">
<input type="password" name="passwd">
<input type="submit">
</form>
</body>
<? }
else
{
$sybase = sybase_connect("a" , "ab" , "");
sybase_select_db("db");
$sql = sybase_query("SELECT Login, Password from anvaendare");
if (Login == $Login AND Password == $Password)
{
$result = sybase_query($sql);
$num_of_rows = @sybase_num_rows($result);
sybase_close();
exit();
}
if (($name == $Login) && ($passwd == $Password) )
{
header("Location: goon.htm");
}
else {
print "<H1>Sorry, wrong username and password</H1>";
}
}
?>