77 Topics
<?php if (isset($_POST['user_id'])) { // Not logged in :( setcookie("secondcookie[id]",$_POST['user_id'], time() * 7200, "/"); // Expiring after 2 hours setcookie("secondcookie[password]", $_POST['user_pass'], time() * 7200, "/"); //when to see if cookies is set or not echo $_COOKIE["secondcookie"]["id"]; //header("Location:verification_data.php"); } if (isset($_COOKIE['secondcookie']['id'])){ // Already Logged in go to page 3 header("Location:page3.php"); } …
<html> <head> </head> <body> <div align=center> Login <form name="form1" method="post" action="b.php"> <div align="center"> <table border="1"> <tr> <td width="120">Username :</td> <td width="144"><input name="user" type="text" id="user"></td> </tr> <tr> <td width="120">Mot de passe : </td> <td width="144"><input name="password" type="text" id="password"></td> </tr> </table> </div> <p align="center"> <input type="submit" name="Submit" value="Enter"> </p> </form> </body> </html> …
the coocckies can make several problems for login?
Hallo, I am trynig to built a poll system. i want to place it in a div of a php file. So i created a form that takes all the data that needs from 2 txt files (questions, options etc). When the user votes the vote.php executes. vote.php <?php $poll_file …
Hello i am trying to use cookie at my site. I used this code for set the cookie try{ Cookie cookie1 = new Cookie("thesiteid", Integer.toString(site_id)); cookie1.setDomain("localhost"); cookie1.setPath("/"); cookie1.setMaxAge(24*60*60*365); response.addCookie(cookie1); System.err.println("Set cookie"); } catch (Exception e){ System.err.println("Error in creating the cookie: "+e.getMessage()); } The problem is that is not working at …
hi actually iu'm fetching 5 question id from db and saved in an array. now i'm fetching questions and their respective options from database. so i'want to save the option in seesions or cookies when ever user selected. this is my code for fetching questions & ANSWERS. public function display( …
let say i create session in login page. here session is on id and username. $_SESSION["id"] = $id; $_SESSION["username"] = $username_p; now to see who loged in i can do this $user_name_s = $_SESSION['username']; //has the name of who is loged in now how do i do this with cookies? …
error:Notice: Undefined index: username in C:\xampp\htdocs\E_COMMERCE\INCLUDE\header.php on line 20 login in information: so i have a checkbox called "$remember_p". if check box is on than i want to set cookies but if its not on than i want to set session. if($remember_p == "on") { //cookies doesnt get destory when …
my cookies not seem to be working. the seesion works fine tho. am i missing some thing? o and i doesnt print echo"on"; if($remember_p == "on") { //remember username for 42 hrs setcookie("id", $id, time()+20); setcookie("username", $username_p, time()+20); //seconds //header("location: index.php"); if(isset($_COOKIE['username'])) { echo"on"; } } else if($remember_p == "") …
Hello Why does my cookie work offline but not offline? It simply stores text, nothing else. Is there some limit that can be blocking it or something?
I've got a website with a splash page where users select one of two languages in which to access the page, and have the option of ticking a "remember me" checkbox, which would write a cookie. On subsequent visits to the splash page, the cookie would be read, and the …
I am working on sessioning scripts however my cookies are not carrying over from page to page. I include the session script on every page which checks the $_COOKIE['session'] cookie, and if set, keeps the session data, if not, creates a guest session and sets a cookie with a new …
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 …
Hello, I have a problem with setting a cookie. People can hide or show background but when they go to another page of the website this needs to be remembered so I need to save it in a cookie. My code so far is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 …
I have this line: document.cookie =textbox+this.getParameterByName("idProd")+'='+document.getElementById('name').value+'; domain=mydomain.com; expires='+dia.toGMTString()+'; path=/'; This cookie should work on the mydomain.com and all of its subdomains to read and write, correct??? Doesnt work online but works on local thats why I ask. Thanks!
Hi Guys, I am extremely new to ASP.net using C# the task i have at hand is as follows: Page Load Tasks 1. Ensure that the LDAP is online first and if it is not provide the user with a message plus send a outlook mail to the administrator. Once …
Can someone please help me I have made an example, of an cookies I have added a value 45 but i have created another page that displays. This prob is when i run the code that has the value 45 its suppose to give me a blank page byut i …
Hi, i want to create cookies in my shopping cart site. I want when i click on add to cart button of this product. the information of the product save in cookies and destroy when user close his browser. I want a script. When i create cookies it's work only …
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 …
Hello there I was wondering if anyone could help me with this problem See I running a site where people can log in, and everytime they log in, a cookie is set, based on their username. so when a user complete a offer, my website send a link to a …
Greeting everyone I wonder if anyone here could help me how to set cookie on my site I have search for how to set cookie but the problem is that i want to use like this: setcookie("user", "[COLOR="Red"]{membername}[/COLOR]", time()+3600); This is just an example i found on google. I have …
hi guys i am working on a site where people can add a button to add a search listing to their favorite item using cookie in php. then they can get this list of cookies to email to their friend, now is there a way to do this? I mean …
[CODE]<?php $time1=time(); $time2=$time1+5; echo $time2-time()."Current time<br>"; setcookie("user","Abhi",$time2); // ECHO "<html> // <body> // <form action='cookie2.php' method='get'> // <input type='Submit'> sybmit // </form> // </body> // </html> // "; ?> <?php while(isset($_COOKIE["user"])) { echo "hi ".$_COOKIE["user"]; echo time()."Current time if<br>"; } if(!isset($_COOKIE["user"])) { echo "hello"; echo time()."Current time else<br>"; } ?>[/CODE] …
Hi All in my project (bot) i want to make two http requests one by one with cookie like : delete something , then appear (Are you sure to delete?) message ,then click submit thanks for all
Dear Friends, I'm Currently using php session ( $_SESSION[''] ), I want to use $_COOKIE Because when a user didn't click the logout button and he closed the website. still he is showing Online because i write the code at the logout page. So If we use $_COOKIE it is …
hi.. i'm going to host my project and on clients site, a user always have to login to view what he can view. So the user has a user name and a password. Is there a way i can enable a user to login automatically without just entering user name …
Hi friends, I likes to implement "Remember Me" Option while sign in to my web site. Please advise me a secure tutorial for doing that . I did all the part of coding ie, at the time of login process 2 sessions will creates named "username" and "password" . and …
Hello friends, this is the first time that i deal with cookies, i'm creating only one cookie for my site. This is the problem i want to validate one thing in my main page, that the user will be able to just click once a link, so in my cookie …
i am writing a website that loges somebody in by cookies. i want to make it so if the person goes to the main page, (index) but did not log out from their last session it redirects them to the members page. how would i do that? also, how would …
how to use cookies in website?
Thanks in advance!!! I have a page, where a collection value is assigining to a variable. And i'm able to assign this variable value to a cookie. But i canot retain this value to the next pages. The problem is occuring with chrome and safari browser. Can anyone save me …
I am using [COLOR="Red"][B]aspx.cs [/B][/COLOR]to create a login page. I would like to create a remember me cookie using a checkbox that will help to remember user ID but will also allow it to be destroy if a different user ID wants to log in with the same computer, but …
I'm creating a website which has a login function. Once the user logs in, they are shown a button that allows them to log out. When the user logs in, a boolean variable on the server is changed to "true", because the user has logged in. When the user clicks …
i am engineering student developing project on shopping cart...how to implement cart using jsp cookies..when user clicks on one item and add to the cart and next if he wishes to go to next page and add another item to cart, then both items value should be added in one …
ok, I don't really understand what's going on whit this... i'm making this site where user may log in. when he log in, php code set the cookies and redirect user on his account. account page (account.php) recognizes him with this code: [CODE]<?php include "conn.php"; if(isset($_COOKIE['ID_my_site'])) { $name = $_COOKIE['ID_my_site']; …
hi,i am making a website in which i have included google search engine.i want to write a code for remembering the previously searched keywords ie if user has written 'a' then all his previous searches starting with a must come in textbox.i dont want to use auto complete feature of …
How to create a permanent cookie? And I am using Asp.Net 2.0
i have created a page where one can edit previous message or add new. for that i created a cookie and store the primary key value and process over one want to edit [CODE]protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { object ob = Session["red"]; if (ob != …
How do cookies work? I've tried sessions, but when i try to get the info, it doesn't pull it in. login.php [code] <? if(isset($_SESSION['Username']) && isset($_SESSION['Password'])){ $_SESSION['Username'] = $_SESSION['Username']; $_SESSION['Password']=$_SESSION['Password']; echo '<META HTTP-EQUIV="Refresh"CONTENT="1; URL=https://www.1fixcomputermedic.com/checklogin.php">'; } else { Print '<form name="form1" method="post" action="https://www.njcomputermedic.fatcow.com/checklogin.php">'; Print '<div class=signin style="position:absolute;top:250;left:450;">'; echo $_SESSION['Username']; Print '<font …
Hi. I have multi-language functionality on my page, and the settings are saved in a cookie, so that the user may change something different than his browser language. But this is whats happening: [U]/home.php?setlanguague=en[/U] The page shows it's text in English, and prints my user info aswell as the content …
To ensure my program keep the client preference after page refresh, do I do this: [CODE]var value = Cookie.get('key'); if (value == null) { // get the client preference // ... // save the client preference Cookie.set('key', 'uservalue'); } // use the client preference[/CODE]
Hey all, Im new to php but i have made a registration page, only thing is i need to make a login. The hard part is I want to show the login box to un-logged in users and say "Welcome USERNAME, Logout" to logged in users. I know there will …
Hello, I want record the visitors ip address and how many time they access my website but the problem that if the visitor behind firewall, so all I'll get a hundreds of visits from the same IP address so I thought about using cookie , first I'll search for my …
Please help?! I don't know anything about cookies and need some friendly explanation. This is what I have manged so far. setcookie(name, $value); I can't get the rest to work. I tried to set the path. But in my browser info thingy it keeps showing the wrong path. As you …
I have absolutely no idea how to create cookies for a shopping cart, and I was wondering if anyone could help me create cookies for my shopping cart. I need cookies for:[B] first and last name, address, city, state, postal code, credit card name, and credit card number[/B]. I just …
Hi.., I want to store user name and password of a client in a cookie.I don't know how to do this in a proper manner.I tried coding simple program.The browser that I'm using is internet explorer(ie).If I put a cookie or not ,anyhow ie prompt a msg for the user …
Hello everyone again, When a user logs in a cookie is set on the users computer called genieuk_logged_session The value in the cookie is a random id created using a random key that the script creates, if i can i need to compare the value of randomin id in the …
Hi guys I'm using asp membership for user authentication and it works perfect. I want to store username into cookies once the user logs in, i tried to implement cookies behind the login control so that when the user logs in the username can be stored into cookies. Once i …
Hi everyone, I have a website where you can vote things up and down. There is no login required to vote and it should register that you have already voted on a particular thing you have already voted on the next time you visit. It seems to work fine but …
Hi Guys I've built a Job Site and I want to prevent a user from applying for the same job twice. Each record has a unique identifier which is its PK from the database. I was thinking of placing the ID in Cookie is this the best way? and also …
The End.