OK, so here's the snippet:
// start rememberMe
$cookie_name = 'db_auth';
$cookie_time = (3600 * 24 * 30); // 30 days
// check to see if user checked box
if ($remember == 1) {
setcookie ($cookie_name, 'username='.$username., time() + $cookie_time);
}
For some reason it breaks and I can't see why. I...
Hi, i'm trying to create an HttpWebRequest/HttpWebResponse session with an ASP.NET website to later parse an HTML form through url params (this part i know how to do), but I do not understand how to parse and set a cookie such as the session id. In Fiddler, it shows that the ASP.NET Session ID is returned through Set-Cookie in the respon...
I'm new to cookie operations
...
Hi All,
I have a PHP site that uses a fairly common authentication scheme.
The entire login area requires ssl.
A user enters their username and pw, if they match the db, a session is started and a value set for them.
If they try to visit a page that requires authentication, it checks to see if that value is present in the session, and...
I have a login setup on a site that stores login information in PHP's $_SESSION, and additionally sets a two-week cookie with login information if a checkbox is checked. The user is considered logged in if valid login information is either submitted by POST or either cookie is true.
The behavior on FF3/Chrome is as intended, at least wi...
Due to weird domain/subdomain cookie issues that I'm getting, I'd like to know how browsers handle cookies. If they do it in different ways, it would also be nice to know the differences.
In other words - when a browser receives a cookie, that cookie MAY have a domain and a path attached to it. Or not, in which case the browser probably...
Hi,
So, I have a series of product pages and all I'd like to do is store the last 5 products viewed in a cookie so it can be displayed as a site-history. The problem I have isn't adding the five initial items to the cookie, its when they view 6, 7 or 10 items. Does anyone have any really decent suggestions on how to tackle this?
Curr...
I have a partly inherited web application in PHP and after poking around with Fiddler I have a little more data than before. The problem I'm trying to solve is unwanted logouts on IE6/8 but not FF/Chrome. If a user clicks between different pages, the login data cookies vanish.
The behavior is different in FF vs. IE, and the reported inf...
currently i have code that does
var req = HttpContext.Current.Request;
if(!isNull(req["title"], req["desc"], req["tags"])) { doSomthing();}
on certain cases i move title into session data then redirect the page or do whatever i need. Now this does not work. Is there something i can use to pull data from either request or session?
...
Hi!
In ASP.NET MVC, how can I create a single cookie and save multplie values to it?
Thanks!!
...
Can someone explain the concept of sessions in ASP.NET? How do I use them, and how do cookies fit in?
...
Is there a integer element for a cookie? I need the cookie to increment by 10 everytime a certain button is pushed. How can I start the cookie at 0 the first time and it's next value is based on it's current state.
document.cookie += 10;
gives 10, then 1010, then 101010.
Right I dea but I need integer values-
Need 10, 20, 30, etc...
...
Do web crawlers use cookies, or discard them?
...
Is there any reason why the click doesn't work in IE6 on the following JQuery code? See ...$('#toggleVAT').click(function... It works in IE7 and FF?
function switchButton(to){
if(to === 'INC'){
$('#toggleVAT').removeClass("exc");
$('#toggleVAT').addClass("inc");
$('#toggleVAT em').text("inc.");
} else {
$('#toggleVAT').addCl...
I want to include a mini menu 20px by 20px images of potential backgrounds.
When a user clicks on one them the body background image will change and the selection saved as the users choice.
I've thought of using a slider but I don't know how I would be able to have the images in a li and be able to change the body css based on the selec...
I am trying to retrieve a saved url from a jquery cookie
its saving in the cookie but its not retrieving the cookie url
$(document).ready(function() { $("#BGSelector a").click(function() {
var imgLink = $("img", this).attr("src");
$.cookie("html_img", "" + imgLink + "", { expires: 7 });
var imgCookieLink = $.cookie(...
Hi,
I have a small problem,
how do I set a cookie for multiple domains?
I do understand the security problems, and I am sure it has been done before. The reason for this is SSO.
ie.
account.domain.com will need to set domain logged in for:
domain.com
domain1.com
domain2.com
Is there any easy way, using PHP and cookies, or any alte...
I'm trying to catch all the non-logged-in users who are trying to get to a directory (where my .htaccess is placed). If someone is not logged-in and try to access some page in this directory, it will be redirected to page "user/?login=222"
A user is logged-in, when the Cookie "HDV-UL" starts with a 5 digit number.
This is my .htaccess:
...
How to dynamically, via javascript, delete a session cookie, without manually restarting the browser?
I read somewhere that session cookie is retained in browser memory and will be removed when the browser is closed.
// sessionFooCookie is session cookie
// this code does not delete the cookie while the browser is still on
jQuery.cooki...
Hi,
i'm trying to set a cookie to store a selected department in. The cookie is set with a small form which has a select-dropdown with departments. This is posted using AJAX.
This is how I store the cookie:
<AcceptVerbs(HttpVerbs.Post)> _
Function ChangeDepartment(ByVal FormValues As FormCollection) As ActionResult
If Response.Coo...