olaf, yes i will read a book
thankyou for your time
do you have an example of what the image display looks like?
could you have a look as i get an error
olaf, yes i will read a book
thankyou for your time
do you have an example of what the image display looks like?
could you have a look as i get an error
read the book and you will know whats wrong there
it is the object which i do find tricky
please tell me what i can use instead of object
i know it is easy
have you used this EXACT code example yourself?
OR do i need to change SOME of it?
do you have an example i could see?
use an array mysql_fetch_assoc(), the php manual has examples for this function
is there something wrong with my code?
QUESTION
should i put something INSTEAD of "uploaded_image" ?
=======================
THIS OUTPUTS alt=image INSTEAD of the actual IMAGE
$query = "SELECT * FROM file_table WHERE id=".$_GET['id'];
$res = mysql_query($sql);
$obj = mysql_fetch_array($res);
echo '<img src="/files/new/'.$obj->uploaded_image.'" alt="alt=image" />';
===========================
SO DOES THIS OUTPUTS alt=image INSTEAD of the actual IMAGE
$query = "SELECT * FROM file_table WHERE id=".$_GET['id'];
$result = mysql_query($query) or die('Error : ' . mysql_error());
while ($myrow = mysql_fetch_array($result));
$file_name=mysql_result($result,$myrow,"file_name");
echo '<img src="http://sistersahoy.com/files/new/'.$file_name->uploaded_image.'" alt="alt=image" />';
============================
this is what I meant, you need to learn php first...
$res = mysql_query($sql);
$obj = mysql_fetch_array($res);
echo '<img src="/files/new/'.$obj['uploaded_image'].'" alt="alt=image" />';yes i do need to learn php
thank you for the amended code.
QUESTION
do i need to replace "uploaded_image" with something else?
"uploaded_image" is the col name in your database table
this is my mistake.
instead of $sql
$sql = "SELECT * FROM file_table WHERE id=".$_GET['id'];
$res = mysql_query($sql);
$obj = mysql_fetch_array($res);
echo '<img src="http://sistersahoy.com/files/new/'.$obj['file_name'].'" alt="alt=image" />';
i had $query
$query = "SELECT * FROM file_table WHERE id=".$_GET['id'];
$res = mysql_query($sql);
$obj = mysql_fetch_array($res);
echo '<img src="http://sistersahoy.com/files/new/'.$obj['file_name'].'" alt="alt=image" />';olaf:
i kiss you a thousand times
thankyou thankyou
AND it only took me 10 hours! that is a fast record for me.
alto
olaf, do you recommend links to free online for LEARNING PHP ? is php.net one of the best?
(FREE, as my internet work is nonprofit, my host is supplied free as the site is registered non-profit)
You must log in to post.