Jump to content

Show data based on user / pass field


kamitai

Recommended Posts

First, thanks for reading this. I will try to explain as best as I can what Im trying to do with php & mysql.

I have a table set up with lots of information I would like to display for a particular user, after they've logged in.

I have a table that has columns with various info such as name, address, user, pass, among others.

I have rows that have this specific information.

I would like a simple log in that would take the user name and password entered and compare it to all the rows to find a record that matched both, then output this for that particular user.

Is this the most simple way to go about it? Is there a better method? Still very new, and would appreciate any ideas or suggestions.

Could I add like a filter of somesort the the fetch below?

 

$sql = "SELECT name, email FROM people_table";

$query = mysql_query($sql);

while($row = mysql_fetch_assoc($query)){

    echo $row['name'].'<br />';

    echo $row['email'].'<br />';

 

Anyhoo ,

Thanks again

Link to comment
https://forums.phpfreaks.com/topic/59677-show-data-based-on-user-pass-field/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.