Updating an inherited drupal site and I’m trying to add php code to the content body using the WYSIWYG editor. I change the editor to source view and use <?php ?> tags. I also choose php code as the input format, and save the page.
When the page is rendered, I see the code on the page.
If I return and edit the page, the code has now changed to <!--?php and ?>
Is there a way, other than updating the database directly, to input PHP code and have it remain unaltered so it is parsed properly?
Sounds like a problem with the way your WYSIWYG editor is set up. Which module is it?
The WYSIWYG editor should be set so that it doesn’t load at all if the PHP input format is used. In addition, you might want to check your “HTML Corrector” settings — it can be set to fix “broken” HTML automatically upon submit. But that’s probably not what you want at all if you’re writing PHP.