Click to See Complete Forum and Search --> : one more cookie


Anne Vance
10-16-2003, 08:40 AM
Hi all,
I am trying to make a cookie which produces the dir and filename of a picture.

I have a nice PHP script from Hotscripts.com for a photoalbum.
when a photo is selected I can echo the dir and filename of the chosen picture with <? echo $pic_url; ?> this gives something like ./gal_1/0006-07.jpg

Now I want this filled into a form on the next page.

When I do this:

<script type="text/javascript">
<!--
function setCookie()
{
var the_name = (<? echo $pic_url; ?>);

var the_cookie = "foto=" + escape(the_name);

document.cookie = the_cookie;

}
// -->
</script>

it won't work.
Can anyone tell me please how to do this?

thnx