Matthias Utrata wrote:Hello. I got the path of images stored in my database with a blob. I wanna access them in php and display them aswell. However, instead of displaying the picture, it displays the select command.
Sure, because that's what's your code is doing - it creates a
string variable with the SQL command, and then it echoes that string variable. There is no code to actually
execute the command. I suggest you read about
PDO, then try to change your code. To help you, here's a few steps that you need to take:
* Execute the command.
* From the result, get the path. You still shouldn't echo the path because that too is a string.
* Retrieve the file from disk and display its contents.
Edit: here's a PDO guide that's apparently a bit easier to use:
https://phpdelusions.net/pdo