ive got a script that submits $UserName which i want to be set as a cookie that bit works but i want it so if there was another cookie with that name that it will overwrite the old one and put the new one from the form in
<?
setcookie ("usernamecookie", "", time()-60); //this removes any previous cookie
setcookie ("usernamecookie", "$UserName", time()+3600); //sets new cookie
but it only seems to work if you refresh the page 1-2 times
help....please