Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

Help required with form validation and mySQL

Codes here !

Moderators: macek, egami, gesf

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

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

Return to mySQL & php coding

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.