Strip_tags + htmlentities - No connection to the variable

Asked

Viewed 44 times

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 that I am publishing the $FLD for a variable:

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

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

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

Only it is not connecting, and I used the same function to connect the loop variable in Javascript. How do I resolve?

  • Are you declaring a variable in javascript or PHP in the second example? If you are using javascript, please inform, so I can add the tag.

  • What do you mean "not connecting"?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.