Try:
setcookie("name","$name",time()+3600);
Without quotes around time()... You submitted the textstring "time()+3600", not the value one hour later as intended (i guess 🙂.
When your cookie was send it had an expire set to zero="Keep cookie until close the browser".
But even when using +3600 your cookie is only valid for one hour, if you like to have the cookie "forever" try +315360000, now it will stick with the user for one year. (If he/she don't return in a year, I don't think you need to know him 🙂
//Nicke