El Forum
10-12-2012, 01:22 AM
[eluser]rochellecanale[/eluser]
hello guys i need a help regarding of getting the picture from my database literally the file path. My problem is after u run the query. It will continue to load and view nothing just keep on loading. Here's my code below hope you can help me.
Here's the sample output from my database:
When i attempt to run in sql like this:
It display a path but when i load it in my php code it shows nothing.
hello guys i need a help regarding of getting the picture from my database literally the file path. My problem is after u run the query. It will continue to load and view nothing just keep on loading. Here's my code below hope you can help me.
Code:
$username = $this->session->userdata('username');
$sql = "SELECT file_path FROM upload WHERE username = '$username'";
$query = mysql_query($sql) or die (mysql_error());
while(($row = mysql_fetch_row($resultSelect))!== FALSE){
$path = $row['file_path'];
}
echo "<br />";
echo "<img src='$path' height='250' width='250'>";
Here's the sample output from my database:
Code:
+-----------------------------------------+
| file_path |
+-----------------------------------------+
| http://localhost/eMLM/upload/Winter.jpg |
+-----------------------------------------+
When i attempt to run in sql like this:
Code:
mysql> SELECT file_path FROM upload WHERE username = 'ssssssssssss';
It display a path but when i load it in my php code it shows nothing.