PHP input for adding cookies


Enter Your Name
HTML code
<form method=post action=cookies_redirect.php>
Enter Your Name <input type=text name=name class='form-control'> 
<input type=submit value=Next class='btn btn-danger'>
</form>
Code for page cookies_redirect.php
<?Php
$name=$_POST['name'];
if(isset($name) and strlen($name) > 1){
setcookie ("Plus2netCookie", $name,time()+3600);
header ("Location: cookies_t2.php"); 

}else{
echo " Input your name first and then click NEXT button 
<input type='button' value='Back' onclick='window.history.back()' />";
}
?>

Subscribe to our YouTube Channel here

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com




    Post your comments , suggestion , error , requirements etc here .




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2022 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer