Welcome Guest, Not a member yet? Register   Sign In
syntax to print a picture in oop fashion (solved)
#1

[eluser]alvaroeesti[/eluser]

UPDATE: Solved

I got the path to the pic by using the echo base url () function

======================================


Hello,

I m trying to write this in OOP fashion, so it should print me the thumb

Code:
echo '<td><a href="closeup.php?id='.urlencode($row['id']).'"><img src="'.htmlspecialchars($row['thumb']).'"></a></td>';

This below is what I have to modify. I have tried variants but none has worked
Code:
<td>&lt;?php echo $encontrados->thumb?&gt;</td>

UPDATE.

Well I have managed the second part. It is like this:


Code:
<td>&lt;?php echo "<img src='$encontrados-&gt;thumb'>"?&gt;
but while now it does show the typical icon of empty picture box, it does not find the picture. I am confused as to what is the path from the table cell in the database, just showing the name of the pic "picture.jpg" and the real call to it

Code:
<td>&lt;?php echo "<img src='$encontrados-&gt;thumb'>"?&gt;

I dont know what else I have to write as path in here above. In fact I have placed the picture in all directories possible, xammp, htdocs, the folder of my application, and of course, the folder where the uploading takes place: assets/uploads/files.

The question:

when you have this "picture.jpg" written in your table cell of the database, where is that actually? where is the directory that gets called by just that ? I am referring to my laptop, not the webserver

thank you


A




Theme © iAndrew 2016 - Forum software by © MyBB