Why does the next script work if passord is correct but NOT if the password is WRONG?
If password is Ok it prints "PASSWORD OK", if password isn't Ok it doesn't print anything...
<?php
require("news/required/configdb.php");
$connect = mysql_connect($server,$user,$pass);
$select_db = mysql_select_db($db, $connect);
$query = "SELECT user_id FROM users WHERE password='$password'";
$result = mysql_query($query, $connect);
while($x = mysql_fetch_array($result)){
$id=$x["user_id"];
if($id != ''){ ?>
PASSWORD OK
<?php } if($id != '') { ?>
WRONG PASSWORD
<?php }} ?>