Strip_Tags + htmlentities - No connection to the variable

1

I have the following problem. I have a database connection, which uses a function called $ FLD to bring the fields I want:

$FLD="idfca, dtafca, solfca";

After this I'm posting $ FLD to a variable:

var fld = "<? echo $FLD; ?>";

And within an Ajax document I created a loop for page Scrool, and I tried to connect this variable with the following code:

$FLD = htmlspecialchars(strip_tags($_POST['fld']));

It's just not connecting, and I used the same function to connect the loop variable in Javascript. How do I solve it?

    
asked by anonymous 23.02.2015 / 15:09

0 answers