Forums

Insert php-script into database (4 posts)

  1. sivh
    Member
    Posted 3 years ago #

    My blog is a tutorial for php, and I want my posts to be able to show php-code (like show_source('filename.php');

    But the insert-statement for my database strips tags, so my php-code is now just plain text... or actually nothing. How do I allow php-code to be written as a regular post?

  2. red-star
    Member
    Posted 3 years ago #

    Put your code between backticks ? Like you can do here on the forum.

  3. brittanie
    Member
    Posted 3 years ago #

    There are several plugins that allow you to do this. Try Code Snippet, or do a Google search for similar plugins.

  4. sivh
    Member
    Posted 3 years ago #

    The Code Snippet worked great!
    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic