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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.