75 Topics

Member Avatar for
Member Avatar for Dani

What is the difference between setting a cookie domain to `www.site.com` vs `.www.site.com` when I want to limit a cookie to the www subdomain?

Member Avatar for macfan
0
809
Member Avatar for vinod tik

i have a problem in displaying the values of a cookie dynamically code goes as... <?php $x=array(); include("connect.php");//database connection file $temp=$_GET['id']; setcookie(count($x)+1,$temp); echo $_COOKIE['$x[1]']; ?> // how do i display the value of cookie every time... it is over written.... i have tried it with using array.. in short i …

Member Avatar for alan.davies
0
2K
Member Avatar for Dani

We just recently (read, today) implemented SameSite cookies to prevent CSRF attacks. The thing is, while there's a decent amount of information online about the benefits of them, I can't find any other sites that implement them. Not even any of the big ones I would suspect were spearheading something …

1
3K
Member Avatar for gentlemedia

I have a form where I save the data in a cookie with localStorage. This all works fine, but If clear (just deleting with backspace) the value of an input field or textarea so that the placeholder text shows up again and I refresh or come back at the page, …

Member Avatar for gentlemedia
0
384
Member Avatar for jkon

Hello, I am writing this to warn you and because I haven't selected yet witch solution to choose , so your opinion is more than welcomed. The problem: in some version of iPhone / iPad software the cookies aren't separated by “;” but by comma and doubled. The first fatal …

Member Avatar for jkon
1
1K
Member Avatar for Ketsuekiame

This "FakeWebClient" will allow a C# application to send and receive cookies as part of the request. This behaviour is not available by default. Please note that on line 35 there is a possible NullReferenceException, I managed this at a level higher but you may wish to handle it in …

Member Avatar for Pavel_47
3
5K
Member Avatar for baloch123

Hi Hope,everyone is doing good out there. I need some help regarding which strategy to use for one of my projects. Here are the project details I want to generate PDF forms, by gathering data from user.There are different questions to ask and based on each answer,we will ask next …

Member Avatar for baloch123
0
733
Member Avatar for luckyuser

I have the cookies and subdomain selection for header: <script type="text/javascript" src="/static/js/jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(function(){ var city = readCookie('city'); if(city !=null && city !=''){ window.location.href = 'http://' + city + '.example.com'; } $('#citygo').change(function(){ var city = $(this).val(); window.location.href = 'http://' + city + '.example.com'; }); }); function createCookie(name,value,days) { if …

Member Avatar for luckyuser
0
2K
Member Avatar for luckyuser

I'm not exactly sure what the problem is but the cookies aren't available for subdomains. Is there any way around this, or is there a better way to set the cookies domain? Thanks! <?php ini_set("session.cookie_domain", ".example.com"); // Set cookie and redirect when user change city if( isset($_POST['city']) && $_POST['city'] != …

Member Avatar for diafol
0
2K
Member Avatar for Christoffer_S

Hey daniwebbers, I need to have some Javascript done, and since I'm not a coder myself I thought some of you might have time to help me out! Basically, I need a script that contains a single-line user input form. When the user then clicks a button - which I …

Member Avatar for Christoffer_S
0
189
Member Avatar for luckyuser

The cookie is not holding and the domain example.com cannot redirect to a.example.com when I type on the address bar. Anyone good at cookies? Any help will be very much appreciated. $(function(){ var city = getCookie('city'); if(city !=null && city !=''){ window.location.href = 'http://' + city + '.example.com'; } $('#citygo').change(function(){ …

Member Avatar for diafol
0
322
Member Avatar for Maideen

Hi I am developing the asp.net using Vb.net code. I need to notify my client if client's browser is disabled the cookies, when the launch the asp.page. Pls help me. Maideen

Member Avatar for Maideen
0
245
Member Avatar for grafic.web

Hi, i am new in asp.net and i found it quiet difficult... i was programming in classic asp and sql server, but asp.net looks quiet different, specially if i do program in C# .... Than i hase a couple of questions : 1) if i do a form with 2 …

Member Avatar for grafic.web
0
365
Member Avatar for bfitzgerald

Hi Guys I'm working on a little log in syetms for my website, hwoever have hit a little snag. I'm using cookies to track which users are logged in. I'm trying to make some pages restricted to vistors that have logged in only, so I decided to use `if($_COOKIE["loggedIn"] == …

Member Avatar for bops
0
249
Member Avatar for fyra

Hi people. I'm writing this topic here in this section because I use OpenSUSE 12.2. I have a weird problem: The page will be displayed to me as gibberish after I write this topic (the next time I access this page). I thought it had something with the cookies but …

Member Avatar for Dani
0
306
Member Avatar for jasonmark238

Hi friends, Waht are the differences between Sessions and cookies in PHP? Please explain with examples. Thanks & Regards Jasonmark

Member Avatar for diafol
0
249
Member Avatar for din3sh

I'm trying to create a php script to print fibonaaci series. The idea is to add a new number to the series everytime the page is refreshed and print the series. <?php if (!isset($_COOKIE["fno"])) {setcookie("fno",0,time()+3600);} if (!isset($_COOKIE["sno"])) {setcookie("sno",1,time()+3600);} if (!isset($_COOKIE["series"])) { $text="0 1 "; setcookie("series",$text,time()+3600); } $fno=$_COOKIE["fno"]; $sno=$_COOKIE["sno"]; $fibostring=$_COOKIE["series"]; //echo …

Member Avatar for broj1
0
248
Member Avatar for tingwong

Hello all. For my project I have to create a snack machine with mints and cookies. So far I have gotten an array of cookies with the code below. However an interesting problem I'm having is my output: OATMEAL cookie LEMON cookie null CHOCOLATE_CHIP cookie OATMEAL cookie LEMON cookie null …

Member Avatar for JamesCherrill
0
1K
Member Avatar for d8m9

Hi, Iam trying to post a form with cookies using [Requests module](http://docs.python-requests.org/en/latest/). When I post the form and see the page with the results, there is an error in the page, saying that I didnt fill one field right. Iam absolute sure I fill that field right. When I post …

Member Avatar for d8m9
0
2K
Member Avatar for Susmita_Sikder

Hi all, I want to get a cookies value from one .aspx.vb page to another .aspx.vb page.but i can not get it. i give the code bellow: This is in:(webForm2.aspx.vb):in this page I set the Cookies value webForm2.aspx.vb (code): Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles …

Member Avatar for G_Waddell
0
587
Member Avatar for garyjohnson

Okay I have a database where it stores the users information, like their login name, email, and password. They can upload videos to my site, when they upload the videos, it saves to a database, the database is set up like this, VIDEONAME EMAIL NAME funny sample@email.com abcd.mp4 It stores …

Member Avatar for LastMitch
0
234
Member Avatar for shuka79

Hi Guys I am currently setting up a cookie message to tell users of the site that cookies are being used (EU cookie law) I have managed to get this working on all desktop browsers, however I am having issues with mobile device ie iPhone, iPad, Galaxy tab etc I …

Member Avatar for diafol
0
271
Member Avatar for Djmann1013

I am having trouble with this code: This is the init.inc.php file <?php //init.inc.php file session_start(); $exceptions = array('signup', 'login', 'index'); $page = substr(end(explode( '/', $_SERVER['SCRIPT_NAME'])), 0, -4); // SQL stuff. mysql_connect('SQL host','username','password'); mysql_select_db('database name'); include('user.inc.php'); //$_SESSION['uid'] = 1; if (isset($_COOKIE['username'], $_COOKIE['password'])){ if (valid_credentials($_COOKIE['username'], $_COOKIE['password'])){ $_SESSION['username'] = htmlentities($_COOKIE['username']); setcookie('username', $_COOKIE['username'], …

Member Avatar for Djmann1013
0
312
Member Avatar for thecameraman

Hello, I created a site where you have to log in and it begins a session. I wanted to make a stay logged in feature so I started using cookies. I made it so if there was no session then check for cookies. My site also sends out emails with …

Member Avatar for thecameraman
0
203
Member Avatar for olegb

I have a web application that needs the identification or some uniqueness of the machine that is calling it. Based on that "id" of the machine the web application will provide information back relevant to that machine. I can certainly call my website with some unique Query params that will …

Member Avatar for pritaeas
0
253
Member Avatar for MDanz

I've looked everywhere and haven't found a clear step by step tutorial on how to secure sessions/cookies. Here are snippets of my code, i'd like to know how i can improve on session security to prevent fixation/hijacking and cookie safety. This is snippets of code for the user login system. …

Member Avatar for pritaeas
0
297
Member Avatar for Emily Banks

A number of the nation's biggest media sites were hit with a lawsuit last week, claiming that they are violating federal eavesdropping and hacking laws by using "zombie cookies." [ATTACH=right]16245[/ATTACH]The technology, created by Quantcast, allows sites to use Adobe's Flash player to reproduce tracking files, even after a user has …

Member Avatar for seowright
0
469
Member Avatar for pgmarco

Hello, I am familiar with PHP and MySQL and teaching myself how to create a login script, I am not sure if I am simple missing something or something is worong with the code. I am able to signup a user and submit the data to the MySQL table, It …

Member Avatar for pgmarco
0
324
Member Avatar for deathscarz

hi i am developing a website in php actually i want to welcome a user by getting his name in text field and give him an option to choose the desired color in which welcome note displayed i-e(red , green .blue) so how can i do it

Member Avatar for diafol
0
133
Member Avatar for vindom

Hi! Im a noob to PHP but had to use it instead of ASP because I couldn't retrieve images from database using ASP + MS Access... Anyways.. I have couple questions: Number 1: How to retrieve and displaymultiple(!) images(jpg) from mysql DB? NUmber 2: I have a main page that …

Member Avatar for grant.baker
0
291

The End.