Forum Moderators: open
Thank All in advance,
ERAN
P.S: if there is away to do so, how can i get the data back to html input boxes from the text file.
I searched the cookies folder but found nothing.
what's wrong?
document.cookie='theme=Matrix Theme;path=/;time()+2592000;'
You can (thankfully) simply override a cookie.
Reading cookies via Javascript is NOT easy and by all means retarded. I suggest using a serverside script to read cookies however I find that there is a two page delay in retrieving new values in cookies. For example, if you set a new value on page16.php, visit page17.php, the server will not echo back the correct value until you visit page18.php. I think this just goes for echoing a value and I'm not sure but the serverside script MAY get the value after the second page loads, but I'm not sure really.
Here is how to echo a value in PHP...
<php echo $HTTP_COOKIE_VARS[mycookiename]);?>
let me explain:
I need to build a simple form (well it is not that simple but just for the example...)
it will have 3 text boxes :
1)for the first number
2)for the second number
3)for the result
after the user will enter the numbers the result will be in the 3rd textbox (input box)
Now,i need to save this 3 values in the cookie.
also if the user will change the values ,the new values will have to override the old values from the cookie.
the html document and the cookie will be send to another user and he will be able to see the values entered by the first user.
i know this is stupid by my boss think its a good idea.
i almost got fired because i told him he was wrong.
i dont want to leave this place because it is 9:00-17:00 job and the salary is good.
please Help me on this.
BEST REGARDS,
ERAN
P.s. i can use only javascript - without PHP
I'm no Javascript Guru so I wish you the best of luck...
I would (if I knew how to do this) try to take the value I want to keep from the cookie after reading the cookie, and pass them along and just rewrite the cookie. Thats just the way my brain works though, I'm not as dynamic as some of the other people here are. Best of luck!
For security purposes, javascript was never permitted to write directly to the user's hard disk.
What web server are you using? Are the pages coming from a local web server, or from a remotely hosted site?
I need more information on your system. I've done this before (taught somebody how to do a HR database in QBasic of all things, but his boss was too cheap to buy anything decent, and QBasic came with DOS so that's what they had!
[badblue.com ]