here is the code where the field is called. it works fine when $password field is a text field. it does not work when $password field is a password field.
function checkStatus($u, $p) {
$connection = @mysql_connect("localhost", "******", "******");
$db_name = "beogor_ivbd2";
$table_name = "ibf_members";
$p = md5($p);
$db = @mysql_select_db($db_name, $connection);
$sql = "SELECT * FROM $table_name WHERE name = \"$u\" AND password = \"$p\"";
$result = mysql_query($sql, $connection);
$num = mysql_num_rows($result);
if ($num > 0) {
return true;
}
else {
return false;
}
}
$destination = "$catagory";
$destination .= "/";
$destination .= "$fileName_name";
if (($fileName_type == "image/jpeg" || $fileName_type == "image/gif") && $fileName_size <= 100000) {
if (checkStatus($username, $password) == true) {
copy ("$fileName", "$destination");
$to = "kevin@beog.org";
$subject = "IMAGE UPLOAD SUCCESSFUL";
$msg = "The file named: $fileName_name has been uplaoded in the folder: $catagory by the user: $username";
$msghead = "FROM: Brass Eagle Owners Group <Webmaster@BEOG.org>";
mail($to, $subject, $msg, $msghead);
}
else {
header("Location: [url]http://www.beog.org/gallery_php/upload.php?name=true[/url]");
}
}
else {
header("Location: [url]http://www.beog.org/gallery_php/upload.php?type=true[/url]");
}
}
any help appreciated