Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

set cookie on button click php or js


function SetCookie(c_name,value,expiredays)
	{
		var exdate=new Date()
		exdate.setDate(exdate.getDate()+expiredays)
		document.cookie=c_name+ "=" +escape(value)+
		((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
	}

Source by www.sitepoint.com #
 
PREVIOUS NEXT
Tagged: #set #cookie #button #click #php #js
ADD COMMENT
Topic
Name
4+4 =