DrTrans Posted July 25, 2009 Share Posted July 25, 2009 Sorry to bother you with this. but its been forever since ive coded php and i know its something simple just cant think of it When id o my login process im setting $loggedin=="1"; im creating a logout button print " <p align=\"center\"><b><font size=\"4\"><a href=\"logout.php\">LOGOUT</font></b></td>\n"; print " </tr>\n"; in logout.php i have: <?php /** * @author * @copyright 2009 */ logoutprocess(); function logoutprocess() { if ($loggedin=="1") { print "<HTML> You have successfully logged out as $dbuser\n"; $loggedin=="0"; } } ?> I knokw im doing this wrong...... Basically what i want to do is be able to call logoutprocess(); and make it do whats in the function. Thanks DrTrans Link to comment https://forums.phpfreaks.com/topic/167366-simple/ Share on other sites More sharing options...
h4rrison.james Posted July 25, 2009 Share Posted July 25, 2009 If you put your code in [code] tags it will make it much easier for people to read and see what's going on Link to comment https://forums.phpfreaks.com/topic/167366-simple/#findComment-882522 Share on other sites More sharing options...
Bendude14 Posted July 25, 2009 Share Posted July 25, 2009 well if you are redirecting to the logout page then $loggedin will no longer be set to 1? You will have to save it in a session variable. Link to comment https://forums.phpfreaks.com/topic/167366-simple/#findComment-882606 Share on other sites More sharing options...
DrTrans Posted July 25, 2009 Author Share Posted July 25, 2009 Ok i created the session variable. But i also need how to execute the function so it says " You have been logged out " Link to comment https://forums.phpfreaks.com/topic/167366-simple/#findComment-882630 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.