Strange PHP problem

Questions about programming languages and debugging
Post Reply
User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Strange PHP problem

Post by Gogeta70 »

Ok, i'm working on my ajax forum and i wrote a function to retrieve a post's content for editing a post. The strange thing is, even though the post is not empty, it returns a string with a length of 0. If i take away the htmlspecialchars() at the end of the function, it returns null. What do you guys think?

Code

The content of the post which i'm trying to retrieve is:

Code: Select all

Ok, here's what i've gotten done:

Changes 10/03/09
-Topic posting
-Profile Editing
-Profile Viewing
-Basic search (i plan on making this more elaborate sooner or later)
-Timezone settings are now applied per-user
-Fixed a bug in the logout/login navigation update function

Known Bugs 10/03/09
None
Edit: oh god... I figured it out. Look at the code on line 11: fid='$tid' lol i'm an idiot XD
¯\_(ツ)_/¯ It works on my machine...

User avatar
h4di
Newbie
Newbie
Posts: 3
Joined: 26 Aug 2009, 16:00
14

Post by h4di »

Check your code from where the value inputed. I think you use JCE or some editior to post. Your post submission not valid for htmlspacialchar.

use " " not ' '

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Post by Gogeta70 »

...What?
¯\_(ツ)_/¯ It works on my machine...

Post Reply