473,569 Members | 2,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with cookies

Hello.

I'm doing a login page in PHP and i'm with some problems with
cookies:

In a login.php, a cookie is set:
...
setcookie("logg eduser","$usern ame", time() + 900, "/");
header("Locatio n: index.php");
...
In index.php the cokkie is tested and reloaded.

if (isset($_COOKIE['loggeduser'])){
$user = $_COOKIE['loggeduser'];
setcookie("logg eduser","$user" , time() + 900, "/");
}

This procedure is performed each time a web page is loaded.

The problem is that when i run the application in enviroment test
(local server) it works fine but when the site is loaded from a real
web server the cookie isn't set.

Somebody can help me!
Thanks

Miguel
Jul 17 '05 #1
0 1264

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3395
by: TJO | last post by:
Can someone at MS please reply to this. I am trying to post data so a web form via ssl with the following code. I keep getting this error: "The underlying connection was closed: Could not establish secure channel for SSL/TLS" private void mainHttpCalls(string postData) { HttpWebRequest objRequest1 ; HttpWebRequest objRequest2 ;
2
1593
by: Netanel | last post by:
Hi, I have a site that I developed in ASP / VBScript. Some of the visitors are complaining that they can't get in into the system (using the login form of-course). My login form includes e-mail and passwords fields, that I check within the e-mail and passwords fields written in the database. Then, if all is OK and the info the visitor...
7
1627
by: patbaudy | last post by:
Hi, I'm coding a shopping cart in asp. I store all info about ordered items, customer's coordonates, etc...into cookies. When the order is complete I use "CDONTS.NewMail" to send an order confirmation's email, where all items and details are listed for the customer. As to retreive all these info a code reads all info stored in the cookies....
1
1711
by: rushik | last post by:
Dear all, We have created a business portal for our organization. The technology used for that is LAMP. Our major access management system of the portal is based on cookies. we set some user level cookies at the time of login; using these cookies we provide access of our pages to user. The problem is, sometimes after login process we...
0
1703
by: Claudio | last post by:
I have a demo app where cookies does not work. The first page create a cookies. The second read the contet. If I browse the pages via IE6.0 the pages does not work. If I browse the pages via FireFox the pages work fine. ************ SetCookies.asp <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...
12
2648
by: Patxi | last post by:
This is the first time I try to use cookies, and despite of reading some tutotials, I'm have real trouble to make it work correctly. My cookie reading code is in Master Page. When I click on a test button (in a WEb User Control inside the aspx page), cookie value is displayed in Master Page but if I go to another page, no value is...
0
886
by: André | last post by:
Hi, I try to insert a graphic (bitmap) to the first file. No problem any more with that. But the graphic generated in the second file (graf2.aspx) must receive values from the the first file. I do that with cookies. It works when i send ONE cookie, but if i send two cookies from the first file, i get the browser-error: "can't render the...
3
1630
by: lawrence k | last post by:
This site was working: http://www.thesecondroad.org/ Now I'm told people are unable to create new accounts or log in. One theory: It seems that cookies are not being set. Our beta testers missed this bug, because the code was working at some point, and so cookies got set to the computers of the beta testers. I have no problem logging...
3
1591
by: jacusp | last post by:
Hi, I have problem with reading cookies. I'd like to save fields of my form into cookies and use them by another page. I save cookies: foreach ($_POST as $idx =$value) { setcookie($idx, $value); }
7
10197
by: cmrchs | last post by:
Hi, In Windows Vista: where does asp.net write its cookies? I use HttpCookie objCookie = new HttpCookie("nameCookie"); in Win2000 (and later) they used to be in C:\Documents and Settings\Administrator\Cookies but not anymore
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.