[support] PHP custom code in drupal block

Shai Gluskin shai at content2zero.com
Sun Apr 19 18:16:16 UTC 2009


Nikhil,

In Drupal 6 you need to turn on the ability to use PHP inline by turning on
that module in the core/optional section of the module list page.

Then you need to allow that imput format for a particular role. However, you
don't need to do that part if you just want user/1 to be able to add php
code.

You add a custom block and click the php radio under imput format.

Remember it is possible to crash your whole site with a php error. Make sure
you back up your database before putting php in a block.

Shai

On Fri, Apr 17, 2009 at 2:05 PM, Nikhil Kala <nikhilrkale at gmail.com> wrote:

> Hello All,
>
> This might be very easy question for some of you, I want to display
> database values into the php block
> How I can do this?
> Can I user normal php coding same in drupal block OR I need to any extra
> steps for it.
>
>
>
> Thanks & Regards,
> Nikhil Kala
> http://www.nikhilkala.com
> <http://www.brainyquote.com/quotes/authors/a/arnold_schwarzenegger.html>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/support/attachments/20090419/85741513/attachment.htm>


More information about the support mailing list