user4fun Posted February 7, 2007 Share Posted February 7, 2007 <? $link = mysql_connect(" ", " ", " ") or die ("No connection"); mysql_select_db(" ") or die ("no database"); //so far it works$get_user = mysql_query("SELECT * FROM `table1` WHERE username = $_POST["username"] AND user_password = $_POST["user_password"]");$q = mysql_fetch_object($get_user); if{(!$q) die("Login Failure: An error occured, please verify your username and password are correct.");}else{echo "hello world";} I am going to want to replace the hello world with lastname, firstname columns from the table 'table1'i am not sure what is wrong Link to comment Share on other sites More sharing options...
pulpfiction Posted February 7, 2007 Share Posted February 7, 2007 This can help you.... [first evample]http://www.w3schools.com/php/php_mysql_select.asp Link to comment Share on other sites More sharing options...
reportingsjr Posted February 7, 2007 Share Posted February 7, 2007 echo $q->lastname.$q->firstname; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now