Is there any way to run a php script when the node is saved?

I want do make/update an XML file when I save the node, but Im not sure how or if I can do this. I use Drupal 6

Any tips on this?

Regards
Peter P.

Comments

Brandonian’s picture

Try creating an action that's triggered when the node is saved. You'll need to have the trigger module enabled, and a custom module that you'll write with the custom action. Here's a handbook page that should be useful.

http://drupal.org/node/172152

WorldFallz’s picture

another option is the http://drupal.org/project/rules module which will allow you to type your custom php directly into the rule without having to create a module.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

matsbarefoot’s picture

Thanks for quick reply!

WorldFallz: This was what I was looking for. The Rules module did solved my problem. Happy to learn about this new module to!

Brandonian: Thanks for the tip and the link. I will check it out when Im starting with modul development.

Thanks again!

Peter

WorldFallz’s picture

excellent-- happy to help. the rules module is an amazingly powerful module-- once you install it you'll probably end up using it for all sorts of things.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz