I want to add some php code to my pages and this page http://drupal.org/node/23220 says:

It is a standard out-of-the-box drupal feature and when creating a PAGE you have 3 filter options when submitting i.e. Filtered HTML, Full HTML or PHP.

I only have the first 2. What do I need to do to include PHP code?

Thanks,
Will

Comments

kuldip zala’s picture

Hi,

You can set php filter by 'admin/settings/filters/add'. Then you have to specify name and select 'PHP evaluator' checkbox to activate PHP filter.

Thanks,

Kuldip

litwol’s picture

make sure you have sufficient access permissions to use php filter. also make sure that php filter module is enabled because in drupal 6 it is disabled by default.

Sometimes something interesting appears on http://litwol.com

bigvortex’s picture

Thanks for the help. Here is what I did just in case other are searching. Under Administer » Site building » Modules there is PHP filter. That was unchecked. I checked it and the filter type was added to the choices I had. When the page was set to the PHP filter the PHP code worked fine.

ricbyrne’s picture

Hi there,
When I go to add the php filter and go to settings/filters/add to add the filter I dont have the option of checking PHP Evaluator. How do I get the this option to apper? any help would be valuable.

Thanks!

kuldip zala’s picture

hi,

enable php filter module from list of modules.
then check it.