Jump to content

Retrieving Data From MySQL for specific user.


jassikundi

Recommended Posts

Hi everyone, I'm trying to retrieve data from my mysql database using php. I've got a table called completed_quote and would like to retrieve  data from the columns (username, postcode, and completedquote) for a specific person who is logged into view the page.

 

I'm currently using $username to retrieve the username of the person from the session.

 

What modifications would need to be made to the php code below that retrieves the entire data from a table.

 

[pre]//Retrieves data from MySQL

$data = mysql_query("SELECT * FROM completed_quote") or die(mysql_error());

 

//Puts it into an array

while($info = mysql_fetch_array( $data ))[/pre]

 

Regards

Jassi

 

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.