Click here to Skip to main content
15,867,771 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
QuestionToolbar image Pin
Elham M25-Feb-11 3:40
Elham M25-Feb-11 3:40 
AnswerRe: Toolbar image Pin
Luc Pattyn25-Feb-11 4:18
sitebuilderLuc Pattyn25-Feb-11 4:18 
GeneralRe: Toolbar image Pin
Elham M26-Feb-11 21:38
Elham M26-Feb-11 21:38 
AnswerRe: Toolbar image Pin
Luc Pattyn26-Feb-11 23:20
sitebuilderLuc Pattyn26-Feb-11 23:20 
GeneralRe: Toolbar image Pin
dpuskaa1-Mar-11 9:04
dpuskaa1-Mar-11 9:04 
AnswerRe: Toolbar image Pin
Luc Pattyn1-Mar-11 9:15
sitebuilderLuc Pattyn1-Mar-11 9:15 
GeneralRe: Toolbar image Pin
dpuskaa2-Mar-11 8:45
dpuskaa2-Mar-11 8:45 
GeneralRe: Toolbar image Pin
Elham M3-Mar-11 4:10
Elham M3-Mar-11 4:10 
QuestionPython Pin
maliwar24-Feb-11 6:04
sussmaliwar24-Feb-11 6:04 
Questionrun once and insert twice in database Pin
nicholasng19-Feb-11 20:21
nicholasng19-Feb-11 20:21 
AnswerRe: run once and insert twice in database Pin
vicky8719-Feb-11 23:53
vicky8719-Feb-11 23:53 
Questiontrying to write a cookie Pin
MacRaider418-Feb-11 9:16
MacRaider418-Feb-11 9:16 
AnswerRe: trying to write a cookie Pin
Peter_in_278018-Feb-11 10:30
professionalPeter_in_278018-Feb-11 10:30 
GeneralRe: trying to write a cookie Pin
MacRaider419-Feb-11 1:46
MacRaider419-Feb-11 1:46 
ok I have changed the code to this:
<?php
$name = $_POST["name"];
$location = $_POST["location"];
$cookie = $name. "," . $location;
setcookie("thomasEmployee",$cookie,time() + 60 * 60 * 24 * 365,"/","linuxserver",false,true);
header('Location: http://linuxserver/index.html');
?>

I have also tried:
setcookie("thomasEmployee",$cookie,time() + 31536000,"/","linuxserver",false,true);

and
setcookie("thomasEmployee",$cookie,time()+31536000,"/","linuxserver",false,true);

but only this seems to work:
setcookie("thomasEmployee",$cookie,time()+31536000);

granted this is a intranet site so not a huge deal, but it would be nice to know why the rest isn't working.

Also this will be available to all pages from this site correct? I'm pretty sure the answer is yes, but I'd like to be sure.
AnswerRe: trying to write a cookie Pin
Peter_in_278023-Feb-11 12:34
professionalPeter_in_278023-Feb-11 12:34 
GeneralRe: trying to write a cookie Pin
Al4224-Feb-11 4:48
Al4224-Feb-11 4:48 
AnswerRe: trying to write a cookie Pin
Luc Pattyn24-Feb-11 5:24
sitebuilderLuc Pattyn24-Feb-11 5:24 
GeneralRe: trying to write a cookie Pin
MacRaider422-Mar-11 5:26
MacRaider422-Mar-11 5:26 
AnswerRe: trying to write a cookie Pin
Tony Wright (UK)24-Feb-11 2:39
Tony Wright (UK)24-Feb-11 2:39 
Questionwhy i cound't access apple's server with php curl Pin
wjun1976121918-Feb-11 5:10
wjun1976121918-Feb-11 5:10 
AnswerRe: why i cound't access apple's server with php curl Pin
Tom Chantler23-Feb-11 21:21
professionalTom Chantler23-Feb-11 21:21 
QuestionData normalization Pin
Mutugi from Nairobi14-Feb-11 20:14
Mutugi from Nairobi14-Feb-11 20:14 
AnswerRe: Data normalization Pin
Eddy Vluggen19-Feb-11 3:04
professionalEddy Vluggen19-Feb-11 3:04 
QuestionGetting google photo result by php Pin
ty-exexch-ko10-Feb-11 9:31
ty-exexch-ko10-Feb-11 9:31 
Questionmysql_query error Pin
komanche7-Feb-11 22:31
komanche7-Feb-11 22:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.