Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
98
rated 0 times [  105] [ 7]  / answers: 1 / hits: 16027  / 12 Years ago, wed, september 12, 2012, 12:00:00

i am having an output problem and i can't seem to trace the problem, here is the code:



sample.js



var m_names = new Array(January, February, March, April, May, June, July, August, September, October, November, December);
var cmonth = myDate.getMonth();
var cdate = myDate.getDate();
var temp1 = m_names[cmonth];
var tempo = escape(temp1 + + cdate);
document.cookie=fcookie= + tempo;


output.php



<?php echo implode($_COOKIE)?>


and it displays



713qnihjmdt7mdq8eejvlcd1q1



but i want to display the date stored in the tempo variable,



i tried dispaying the tempo variabe directly and it dispalyed the right output,



any suggestions? i think i need to add a code in the php side.


More From » php

 Answers
11

i just changed the following



document.cookie='fcookie='+tempo; 


and



if (isset($_COOKIE[fcookie])) 
echo $_COOKIE[fcookie];
else
echo Cookie Not Set;

[#83127] Monday, September 10, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
diane

Total Points: 264
Total Questions: 104
Total Answers: 95

Location: Liechtenstein
Member since Wed, Dec 8, 2021
2 Years ago
;