Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drupal: Display success/error message

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

Thanks in advance!

like image 320
n00b Avatar asked Mar 19 '10 10:03

n00b


1 Answers

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

like image 121
Wim Avatar answered Oct 19 '22 09:10

Wim