First I would like to know how to display an image in PHP just by using the path of the image? without using BLOB.
AND
I have a table in my database which is layed out this way..
columns : i1 i2 i3 i4 i5 i6 i7 i8
each field hold a value or is empty.
I would basically want to display the values of i5 i6 i7 i8 according to what is in i1 i2 i3 i4.
For e.g:
i1=a i2=b i3=e i4=q i5=g i6=l i7= i8=
For this case i would like g and l to be displayed. But i want the values to be stored in an array.
I tried doing:
$list = array(g,l)
$query = " SELECT i5, i6, i7, i8 FROM Table WHERE i1 AND i2 AND i3 AND i4 IN ('$list') ";
$s = mysql_query($query);
while($data = mysql_fetch_array($s)){
$r_1 = $data['i5'];
$r_2 = $data['i6'];
$r_3 = $data['i7'];
$r_4 = $data['i8'];
}
echo "$r_1 $r_2 $r_3 $r_4"`
Which is not working even if i do $list[0]
Help would be appreciated. Thanks