WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Using PHP variables with HTML (2 posts)

  1. Jack Reichert
    Member
    Posted 4 years ago #

    Hi,

    I've set up an options page for my theme in the admin area. On this page I would like to offer the user to save code in a textarea input form. I will then insert that code into a post.

    I've set up the form, no frills, standard, but when I save HTML the form seems to be saving it with extra backslashes before each quote mark and hence the code is not printing properly in the front end...

    Any ideas what may be causing this? Do php variables automatically do this? Is there a wordaround?

    Thanks

  2. Jack Reichert
    Member
    Posted 4 years ago #

    The answer was to use stripslashes with the echo output...

    http://php.net/manual/en/function.stripslashes.php

Topic Closed

This topic has been closed to new replies.

About this Topic