如何获取特定用户的上传图像

Database tables: [A].registationform [B].login

Total file (1)Registrationform.php (2)login.php (3)profile.php

In file Details: (1)Html fields: Upload Profile Picture and other details.

(2)username, password only registrated user allow use of session

Problems: (3)Profile.php display details with his own picture. how can i get his picture form "registrationform" table. DBTable olny Image name is there and file in Upload Folder.

My Query

$order = "SELECT * FROM `registrationform` where user_id='$id'";    

$result = mysql_query($order);   
while($data = mysql_fetch_row($result))
 {
  echo("<tr><td>FISTNAME:$data[1]</td></tr>
    <tr><td>LASTNAME:$data[2]</td></tr>
    <tr><td>IMAGE:$data[5]</td></tr>");
 }

can you give me suggestion

Thank you.

You may use the following statement:----

$order = "SELECT * FROM `registrationform` where user_id='$id'";    

$result = mysql_query($order);   
while($data = mysql_fetch_row($result))
 {
  echo("<tr><td>FISTNAME:$data[1]</td></tr>
    <tr><td>LASTNAME:$data[2]</td></tr>
    <tr><td><img src='Upload/$data[5]'></td></tr>");
 }

I hope that it will display the image of particular user.

When you upload the image, get the files location. Store the file location into the database and when the profile page is viewed, echo a img tag with the location field as the 'src' value.

You need to upload the image and save the image path in DB ...

and at the login time you have to fetch the image URL from DB and you can show it easily.