Hey everybody.

I'm using this code to select all 3 columns from my database table.

PHP Code:
$stmt $mysqli->prepare("SELECT * FROM entries")) { 
   
/* Query uitvoeren */ 
$stmt->execute(); 

/* bind result variables */ 
$stmt->bind_result($id$title$body); 

/* fetch value */ 
$stmt->fetch(); 


echo 
$id
echo 
$title
echo 
$body
($mysqli contains a working connection.)

Now. The echo statements at the bottom of the code only produce output for $id and $title. $body is an empty string.

After doing some research, I noticed that mysqli don't bind results to a variable if the result in the database contains these characters: < or >.
So if i would change my title from "This is a title" to "<This is a title". The $title variable will be empty after the bind_result call.

PS: My body always contains HTML code. Like:
<h3>Subtitle</h3>
<p> text </p>

Very simple HTML code. But it seems that mysqli won't return values with a greater than or lesser than sign..

PS: I use a MySQL database.

Does anyone know how I could 'fix' this. Or knows a workaround.

Thanks in advance.

Greetings,
Dave