cookies

PHP Autologin function to login script

How would I implent an autologin feature to this script? session_start(); $result = mysql_query("SELECT id FROM users WHERE username = '{$_POST['username']}' AND password = '{$_POST['password']}'"); if (isset($_POST['savelogin'])) { setcookie("SaveLogin", $_POST['username'], tim...

My cookies won't bake properly

I have this weird problem with setting up cookies with PHP. Everything worked fine until this morning when i uploaded my script to the server. Here is some of my code if (!isset($_COOKIE["loggedin"])){ show login form } else { show content } This is in my login page setcookie("loggedin", "true", time()+3600,"/","mydomain.com"); ...

Auto-login with cookies

Hi, I've been trying to make an Auto-login feature to my login script for 2 nights now. So right down to the problem. I have a field in my users table called session_key varchar(255) in which i store the users IP hashed with md5. If the cookie is set, session vars will be set and if not a form will appear. When they login and if the...

Should I use Storable or FreezeThaw to serialize Perl data as a cookie value?

I'd like to store some data in a cookie and my initial though was to pack it myself, but then I remembered that There Is A Module for Everything. I have looked at both Storable and FreezeThaw. Both seem appropriate, though the latter mentions string specifically and seems to serialize into a string without newlines, whereas Storable cr...

Gridview and visited items

Hi, I have a asp gridview which shows some properties and links to another page. When the user is seeing the gridview I would like to highlite the whole row (not just the link) for those rows where a user has clicked the link before. I was thinking about onclick to save the id of the row in a comma seperated cookie, and the OnItemDataBo...

PHP - Loading CSS using cookie, but cookie isn't being read?

I currently have a web site where users can select a custom theme. After they choose the theme, a cookie is created. The cookie contains the correct data and points to the correct CSS file. For some reason, upon re-visiting the site, the theme is not loaded. I should point out that I am new to PHP so it may be a very easy mistake. P...

PHP - Using a drop down list to change site theme

I have a drop down list where users can select a theme for the site. The only problem is, I'm not quite sure how to properly load the theme once they press "Apply". I am new to PHP. I know if I use GET, it will pass the variables through a the current page and add them to the end of the URL. I would really like to avoid that. So, I g...

Page load time with Cookie vs Session in PHP

I have a social network type site (member site) I store a lot of user data like username, userID number, email, first name, photo URL, into a user session when the user logs in to cut down on the ammount of DB queries per page. I sometimes hear people talk about using cookies for some things, I realize cookies should never be used for u...

One cookie with many values or many cookies with one value?

I guess the title says it all. If I have many settings that I want to store in a cookie, should I create multiple cookies with one option each, or one big cookie with multiple options in a serialized array or something? Are there any pros/cons for either approach? What do most people do? ...

If jquery POST to a PHP file will cookies work?

I use jquery for a login, it has the gmail type ajax login affect so the user never actually see the login page they are posting to, on this login backen script I set a cookie to remember a users email address, I am curious if cookies are able to be set if the browser never actually goes to the page, it just post to it? ...

http request ... cookies

A site A (say url : www.a.com) is composed of different editions : each day a new edition. However, the site is not restful: the site is using cookies (I think) to save the edition the user wants onto access. So to access an article of a given edition, we have to first submit a form to specify the edition, and then get the articles of ...

using cookies with twisted.web.client

I'm trying to make a web client application using twisted but having some trouble with cookies. Does anyone have an example I can look at? ...

How can my website delete another site's cookies?

I'd like to remove the cookies of another site from users on my site. Is there any way to access the cookies from different domains. ...

Where is session stored if cookie is disabled on client’s machine? What is actually stored in session?

In config file I have the below settings sessionState mode="InProc" cookieless="false" Does this indicates that the sessionid is stroed in cookies? If yes then how is it picked and sent to the server and how is it verified across postbacks. What will happen if cookies are disabled in my browser, will the session(sessionid and session ...

Difference between http://example.com and http://www.example.com?

For sessions and cookies, is there a difference between example.com and www.example.com? I have a very strange problem with our web application The privat web is: private.example.com The public web is: example.com For some reasons outside my control www.example.com is allways redirected to example.com I guess this is the setup on the ...

Best way to control shopping carts

Hi I am trying to build a simple shopping cart, i read about controlling them and see there are 3 ways to control them. one is cookies, another one is session based, and last one is database model. I am wondering which one is better choice ? some told that database method is better but its harder too. I am also looking for database model...

Tomcat: Set cookie value multiple times for 1 request?

I'm running into a problem with Apache Tomcat 6.0.20 where I can't change a cookie's value once it has been added to the response. Basically, I'm trying to replicate Session functionality using cookies. I have a custom "Session" object, which is backed by a cookie. When I create my Session, I pass it an HttpServletResponse, and it cre...

How to solve session fixed in asp.net ?

Right now I need to save content into Session object of an asp.net program, and I found when i save something into session object, asp.net will generate a cookie which contains ASP.NET_SessionId = "current session id". This will cause the session fixed security issue. Who can help me to solve this ? ...

What should be stored in a cookie for a login system?

What is the best thing to store in a cookie to keep a persistent logged-in state? I have seen many websites (and beginner tutorials!) that simply store something like validUser=1 in a cookie. Clearly I could spoof that and the website would think I was a valid user. If the username is stored in the cookie I could masquerade as any user...

Where in the filesystem does IE8 store values stored in localStorage?

My organization is starting to use this feature and for testing it would be ideal if we could find and delete these values as well as see what's written to disk, but I can't figure out where IE8 is storing them. I found the .sqlite files in AppData\Local\Apple Computer\Safari for Safari and AppData\Roaming\Mozilla\Firefox\Profiles\ryb...