myrickcomputers Posted January 24, 2009 Share Posted January 24, 2009 i am trying to create a logout link to log users out of an employee area only on my website any ideas? Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/ Share on other sites More sharing options...
nuttycoder Posted January 24, 2009 Share Posted January 24, 2009 how are there login details stored cookies, sessions? Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744943 Share on other sites More sharing options...
myrickcomputers Posted January 24, 2009 Author Share Posted January 24, 2009 cookies Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744944 Share on other sites More sharing options...
nuttycoder Posted January 24, 2009 Share Posted January 24, 2009 to unset the cookie set it to a previous time mycookie refers to the name of your cookie  setcookie("mycookie","",time()-3600);  create a link to a php file with this code in it like  <a href="logout.php">logout</a>  Login.php  <?php setcookie("mycookie","",time()-3600); //load index page header('Location: index.php'); ?> Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744949 Share on other sites More sharing options...
myrickcomputers Posted January 24, 2009 Author Share Posted January 24, 2009 like i said i am very new to this and i am not sure whether it is a cookie or not b/c i just created a directory with .htaccess Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744952 Share on other sites More sharing options...
nuttycoder Posted January 24, 2009 Share Posted January 24, 2009 is it htaccess bring a login box up? Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744955 Share on other sites More sharing options...
myrickcomputers Posted January 24, 2009 Author Share Posted January 24, 2009 yes  the link to it is http://www.myrickcomputers.com/downloads Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744958 Share on other sites More sharing options...
nuttycoder Posted January 24, 2009 Share Posted January 24, 2009 I don't use password with htaccess so I can't tell you but doing a quick look on google I found a post that may help http://www.webmasterworld.com/forum13/3147.htm Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744962 Share on other sites More sharing options...
myrickcomputers Posted January 24, 2009 Author Share Posted January 24, 2009 that did not work for my site any other ideas Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744974 Share on other sites More sharing options...
jeger003 Posted January 24, 2009 Share Posted January 24, 2009 how about posting your login code here and maybe some one can make something of it Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744981 Share on other sites More sharing options...
myrickcomputers Posted January 24, 2009 Author Share Posted January 24, 2009 if you could tell me where to find it on my site i would but i didnt set up the .htaccess my webhost did Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744982 Share on other sites More sharing options...
nuttycoder Posted January 24, 2009 Share Posted January 24, 2009 normally it would be located in the root of your site or in the folder your protecting Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744985 Share on other sites More sharing options...
myrickcomputers Posted January 24, 2009 Author Share Posted January 24, 2009 i cant find the .htaccess file  Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744989 Share on other sites More sharing options...
.josh Posted January 24, 2009 Share Posted January 24, 2009 using a .htaccess for 'logging in' only password protects a directory and its subdirectories. There is no 'logging out' from it, except to just, you know, leave the directory.  It is not the same as a full fledged login system. Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744991 Share on other sites More sharing options...
nuttycoder Posted January 24, 2009 Share Posted January 24, 2009 If you want to create a login/logout system here's a good tutorial for it http://www.newmedia.lincoln.ac.uk/dcarr/tutorials/php/login-script-with-validation Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-744996 Share on other sites More sharing options...
myrickcomputers Posted January 24, 2009 Author Share Posted January 24, 2009 i am afraid to say that is still over my head Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-745001 Share on other sites More sharing options...
nuttycoder Posted January 24, 2009 Share Posted January 24, 2009 in that case your best off getting a good php book that starts at from scratch and take it from there. Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-745004 Share on other sites More sharing options...
myrickcomputers Posted January 24, 2009 Author Share Posted January 24, 2009 thanks for the help Link to comment https://forums.phpfreaks.com/topic/142202-solved-help-im-new-to-coding/#findComment-745005 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.