Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 08-22-2004, 06:56 PM Hi, cookie help
Phobz's Avatar
Novice Talker

Posts: 8
Trades: 0
Im having a problem here and was wondering if somebody could help me.
Here is what I got:


<?php
session_start();
header("Cache-control: private");
header('Content-Type: text/html; charset=utf-8');
header('Set-Cookie: track=978268624934537');

if($_SESSION['cookieenable'] == 1){

$hostname = hhcaddictz.com;

setcookie("name", $_SESSION['username'], time()+36000, $hostname);
setcookie("pass", $_SESSION['password'], time()+36000, $hostname);

}

?>

^ This is in my index file, Im using include() for the other pages.

<?

if($checkbox){
$cookieenable = 1;
$_SESSION['cookieenable'] = $cookieenable;
}

?>

^ This is from my form and the remember me button is called checkbox.



It works but Its only doing the password, plus ive used $password = md5($password) then $_SESSION['password'] = $password.

Ive tried username alone, it seems as though my $username string as something wrong with it. Maybe somebody knows my problem...



Cheers in advance

Paul

Last edited by Phobz; 08-22-2004 at 07:05 PM..
Phobz is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Hi, cookie help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.07696 seconds with 12 queries