Reputation: 908
I'm trying to make a textarea (name="google_analytics_code"
) that will save in the DB the google analytics script. The problem is that it will not even POST anything ($_POST['google_analytics_code'] = ""
) if I paste the script from google with script tags in it.
How can I make the textarea to be posted with the whole script (including script tags)?
Upvotes: 0
Views: 876
Reputation: 51705
It should work. See this JSBin for a demo.
If it's not working, it would help to see code — an example of a stripped-down HTML page and PHP script that reproduce the problem.
Upvotes: 1