Jump to content

get database photo

- - - - -

  • Please log in to reply
1 reply to this topic

#1
mutago

mutago

    Programmer

  • Members
  • PipPipPipPip
  • 102 posts
Good everyone, I want to get image from database IN PHP
in java, I can get it using id with integer data type as follow

<img src="image.jsp?id=<%=rs.getInt(1)%>">

but in php, i have created an array but I cant get the image.
my image link is

<img src=image.php?id=<? echo row['id'];?><br>

I know I can get the image in php using
<img src=image.php?id=1> but I have created an array and wants to get it just as I can do in Java
thanks

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
It is unclear what you are trying to do, does rs.getInt(1) retrieve one integer from the response?

Quote

but I have created an array
How will you use this array in your program? Is it an array of ids?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users