DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Integrating Reinvigorate Name Tags Into A PHP Site
This is a script which will intergrate reinvigorate name tags into your PHP site using cookies Put this on any page you want to have visitors enter their name
<FORM ACTION="index.php" METHOD="GET"> <p>Name <INPUT TYPE=TEXT NAME= "n" SIZE=20><br> <INPUT TYPE=SUBMIT VALUE="Submit!">
Put this on your index.php page at the top before anything. This will set a cookie that will last for 2 months
<?php $Name = $_GET['n']; ?> <?php $inTwoMonths = 60 * 60 * 24 * 60 + time(); setcookie('name', $Name, $inTwoMonths); ?>
Put this at the first line after the <body> tag. You need to change the USER-ID to your user ID that you can get from the regular reinvigorate code.