The third one you can do it in the Mysql query:
- Code: Select all
$sql = "SELECT user_id, username, user_password FROM ".$table." where username='$user' and user_password='$passwrd'";
$sql_result= mysql_query($sql,$db) or die ("<h3>Couldn't select info</h3></BODY></HTML>");
if ($row = mysql_fetch_array($sql_result)){
do{
hello_message($row["user_id"],$row["username"]);//or whatever
}while ($row = mysql_fetch_array($sql_result));
}else{
echo "No coincidences were found, try again please";
}
bye!

