Jump to content


Photo

how to login a user after he is registered


  • Please log in to reply
4 replies to this topic

#1 asdfghjkl

asdfghjkl
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 06 June 2006 - 09:13 AM

......
mysql_connect (localhost , $username ) or die ( mysql_error()) ;
mysql_select_db ( $database) or die (mysql_error()) ;
$query =mysql_query( "select *from $tbl where username='$username1' and password='$password' ");
if ( !$query )
{
echo " I am closing the connection " ;
exit ;
}
else
{
mysql_fetch_array($query) ;
echo "Welcome" ;
}

i am connected to the database have the username and password signed ,
builded the mysql_query and now i am trying to if the username and password are not correct then destroy
, otherwise print "Welcome "
will you guide me ?

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 06 June 2006 - 10:11 AM

pardon?

#3 asdfghjkl

asdfghjkl
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 06 June 2006 - 10:50 AM

what you're talking about

#4 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 06 June 2006 - 11:03 AM

Have you got a question? What is it? Be as clear as possible!

#5 asdfghjkl

asdfghjkl
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 06 June 2006 - 11:12 AM

Thorpe ,
i think that you are the one who got to make it clear . What you are talking about ?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users