|
Posted by Tamer Higazi on 09/16/05 21:02
Hi!
I wrote a small script setting a cookie.... but nothing is being set.
What could be the problem?! Did I make something wrong?! One script is
used to ask for the cookie and the other one shows the displayed
variable in a string only! But if I look at Firefox in the cookie cache
if the variables are set... I didn't find anything. what could be the
problem?!
Apache 2.0.54 with PHP 5.1 RC1 on Gentoo Linux 2005.1
For any help... Thanks in advance
Tamer
1st Script: Abfrage.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<?
ob_start();
?>
<html>
<head><title>Registrierungsformular</title>
<link rel="stylesheet" href="eigenschaft.css" type="text/css">
</head>
<body>
<center>
<?
if (isset($_POST["register"]) && ($_POST["register"] == 'Abschicken!')
&& ($uid = check_auth($_POST["Login"],$_POST["Passwort"])))
{
setcookie('uid',$uid,time() + 14400,'/');
header('Location: http://localhost/~tamer/Anmeldung.php');
exit();
} else {
?>
<h1>Hallo... dies ist ein Test!</h1>
<form method="POST" action="Anmeldung.php">
<table>
<tr>
<td>Login: </td>
<td><input type='text' name="Login"></td>
</tr>
<tr>
<td>Passwort: </td>
<td><input type='password' name="Passwort"></td></tr>
<tr><td><input type="submit" name="register" value="Abschicken!"></td></tr>
</table>
</form>
</center>
<?
}
?>
</body>
</html>
2nd Script: Registrierung.php:
<?
$login = $_REQUEST["Login"];
$Passwort = $_REQUEST["Passwort"];
print "Mein Login ist: $login und das Passwort ist: $Passwort";
?>
Navigation:
[Reply to this message]
|