Help required with form validation and mySQL

Codes here !

Moderators: macek, egami, gesf

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

Postby Joan Garnet » 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)){
   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!

Return to “mySQL & php coding”

Who is online

Users browsing this forum: Google [Bot] and 1 guest