Help required with form validation and mySQL

Codes here !

Moderators: egami, macek, gesf

Post Reply
User avatar
Joan Garnet
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars

Tue Jan 21, 2003 5:36 am

The first two topics have to be fiexd using javascript. Go to the javascript forum and post them (if you don't find answers first)

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)){
      hello_message($row["user_id"],$row["username"]);//or whatever
   }while   ($row = mysql_fetch_array($sql_result));
   echo "No coincidences were found, try again please";


Post Reply