I keep getting “-Query Not run”.
The login script is as follows
[php]
<?php
require_once("../includes/ikobe.php");
08
09
if (isset($_POST['username']) && isset($_POST['password']))
10
{
11
12
$username = $_POST['username'];
13
$password = $_POST['password'];
14
$pass = sha1($password);
15
16
if (!empty($username) && !empty($password))
17
{
18
19
$query = "SELECT id FROM users WHERE username ='$username' AND password ='$pass' LIMIT 1";
20
$query_run = mysql_query($query);
21
22
$query_num_row = mysql_num_rows($query_run);
23
24
if (mysql_num_rows($query_run) == 0)
25
{
26
echo 'Invalid username / password';
27
28
}
29
else
30
{
31
echo 'Ok';
32
}
33
}
34
else
35
{
36
echo 'please fill in values for username and password';
37
}
38
}
?>
[/php]
I have the login page in a different folder but is as follows
[php]
Untitled Document
- Username:" />
- Password:" />
-
-
[/php]
the database is working because I can create records and see them in phpmyadmin.
any ideas and help will be greatly appreciated.