PHP Error After Migrating Code to X10

Carpetfizz

New Member
Messages
1
Reaction score
0
Points
0
Hello!
I discovered X10 a couple hours ago and decided to migrate all my code from my home server to this, and I'm quite happy with the results. I just have one small problem. My website queries an SQL database using PHP, and displays the results in HTML. It then takes the output of the frontend HTML, and saves it into a variable, which gets pushed into a function that sends an email with that variable. All of this works as of now, but my code is written so that it will echo "faires" on the screen, and I'm getting a strange one. This is what it says:
Notice: Use of undefined constant ENT_HTML401 - assumed 'ENT_HTML401' in /home/summitma/public_html/tablegen.php on line 117
This is line 117 of my code:
HTML:
[CODE]$escaped_output = htmlspecialchars($output, ENT_HTML5 | ENT_QUOTES);[/CODE]
It looks as though it should be a quick fix, because the functionality works perfectly, its just this warning popping up. I can always "not display" it, but I'd rather fix it than let the problem build up.
Thanks!
~Carpetfizz
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
You're trying to use a constant that was introduced in PHP version 5.4. The PHP version being used here is 5.3, so the constants aren't defined — and even if they were (if you were, say, to define them yourself), htmlspecialchars() and htmlentities() won't recognize those flags.
 
Top