|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-10-28 15:26 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 20:00:01 2025 UTC |
I have been trying to setup cookies on a new site I'm working on. However no matter what I try I can't create the cookie. The best I can tell this just doesn't work with the CGI version of PHP. I am running windows 2000 server with IIS. Below is my code to create the cookie. THANKS <?php $username = $_POST['username']; $password = $_POST['password']; include_once('homeconnect.inc'); $result = mysql_query("SELECT * from users where home_user='$username' AND home_pass='$password'"); $num = mysql_num_rows($result); // how many rows match our query? if ($num == 0) // if none? { die ("Username or password was incorrect, or you have not yet registered. <a href='signup.php'>Click Here</a> to sign up now.");} mysql_close($db); setcookie ("user", $username); header("Location: http://tim.brogdon.net/homepage/default.php"); exit; ?>