After looking at that for 2 hours its kind of annoying when u miss out the dbconnect include file.. oh well must remember to look at that first next time..
but now im connected i cant seem to get my password and username checking to work?
which works out from what i worked out check username if not same invalid message if ok carrys on to password if password match login successful if not match incorrect password message?
that is the order which i want it to work with but i have tryed different arrangements of the if statments and does not seem to work . this i know is me making a silly mistake. where as last i thought was sql messing me about some how... but the ordering of if statments is not my strong point.
<?
include "../includes/dbconnect.php.inc";
$login = "select username, password from hvgUsers where username = '$username'";
$text = mysql_query($login);
$row = mysql_fetch_array($text);
if ('$row[0]' !== '$username')
{
echo ("<BR>Invalid Username");
}
elseif ('$row[1]' !== '$password')
{
echo ("<BR>Password Incorrect");
}
else echo("Login Successful");
?>
Thanks again.