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.
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\xampp\htdocs\UTR\quiz\fragen.php on line 65
So $row is not an array, and it does not have an index called BildId. So when you pass it to PDO, it gets turned into something that does not exist in the database. Try hard-coding the value first (BildId 1 should be valid based on your inserts):
Get this working first. Then focus on getting the BildId from somewhere else. Hint: it's not from $row.