http://php.flashwebhost.com/mini/cookie.php
Code:<?php if (isset($_COOKIE['Yoga_name'])) { echo $_COOKIE['Yoga_name'] . ', Welcome to Free Online Yoga Videos'; exit; } if (isset($_POST['Yoga_name']) && strlen($_POST['Yoga_name']) > 3) { setcookie('Yoga_name',$_POST['Yoga_name'], time() + 7200); echo 'Cookie Set. Close the browser. Revisit this page, I will remember your name'; } else { echo ' What is your name ? <form method="post" action=""> <input type="text" name="Yoga_name"> <button type="submit" name="submit">Enter Web Site</button> </form> '; }




Reply With Quote


Bookmarks