n00b
n00b

Reputation: 16536

Drupal: Display success/error message

how can I show users success/error messages without creating a node for it?

Thanks in advance!

Upvotes: 10

Views: 27649

Answers (3)

Aditya Richhariya
Aditya Richhariya

Reputation: 1

Use this code in settings.php to disable the error messages:

$conf['error_level'] = 0;

See this blog: from here

Upvotes: 0

Wim
Wim

Reputation: 11242

drupal_set_message($msg, $type = 'status'); lets you set a message, it will be displayed automatically on the next (or current) page the user visits.

The optional second argument lets you choose between an informational message (status), a warning (usually yellow) or an error (red).

See the docs: http://api.drupal.org/api/function/drupal_set_message/6

Upvotes: 19

wiifm
wiifm

Reputation: 3798

Not really too sure what your question is, in your theme, there will be the variable

<?php
    print $messages;
?>

This will print any success/error messages to the screen. They are not stored as nodes.

For a complete list of drupal variables see the documentation

Upvotes: 0

Related Questions