Click here to Skip to main content
14,773,274 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
$sql = "select * from oficers_tbl"; $stmt = $con->prepare($sql); $stmt->execute();

while ($row = $stmt->fetch()){


What I have tried:

i want to retrieve an image from database and display it, the image Path stored on my folder call 'upload' Bellow is My Code
Updated 10-Aug-20 0:15am

1 solution

This is the same question as I want to retrieve an image from my database using PDO[^], and you still have not explained what the problem is.
Ibrahim Hassan 1234 10-Aug-20 5:21am
Sorry Sir i am trying to explain it but i dont know why it been automatically removed this is my problem.
$sql = "select * from oficers_tbl";
$stmt = $con->prepare($sql); $stmt->execute();

while ($row = $stmt->fetch()){

but it only show me blank image thumbnail
Ibrahim Hassan 1234 10-Aug-20 5:23am
echo""; i put something inside double queto like "upload/$row[img]" but it's not show
Richard MacCutchan 10-Aug-20 5:26am
You need to use the debugger to examine each record that you read from the database. We have no way of getting that information.
Ibrahim Hassan 1234 10-Aug-20 5:28am
thank you sir.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900