whenever I run session_destroy('muls');
i get this error Warning: Wrong parameter count for session_destroy() on line blah blah
im running
session_start('muls'); session_destroy('muls');
can anyone help?
via php.net
session_destroy() destroys all of the data associated with the current session. It does not unset any of the global variables associated with the session, or unset the session cookie.
session_destroy() is a void function and will destroy the session currently running.
already read that, according to the other session_destroy() posts I'm using the correct syntax and all, but I ahve no idea what this error means ...
don't pass anything to session_destroy ... pass it as a void funtion i.e.
session_destroy();
instead of:
session_destroy('mules');
ok!
do I use
session_start('muls');
or should it just be
session_start();
(im only using one session in the website)
just sesstion_start()
to log someone out, do session_unset() then session_destroy().
Make sure you use session_start() at the top of every page you want to use the session vars on. Put that right at the top, before any HTML output.