Beste Tweakers,
Ik heb een loginscript waarbij ik een cookie-string heb toegevoegt:
Maar telkens als er op een link in de pagina word geklikt moet er opnieuw worden ingelogt.
Hier is mijn gehele code:
Weet iemand mij hierbij te helpen? Alvast bedankt.
Mvg
Timothy B.
Ik heb een loginscript waarbij ik een cookie-string heb toegevoegt:
code:
1
| setcookie("ribosystemsusername", "$username", time()+5184000, "/"); |
Maar telkens als er op een link in de pagina word geklikt moet er opnieuw worden ingelogt.
Hier is mijn gehele code:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
| <?
include "glist.php";
?>
<html>
<head>
<title>xxx</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
</head>
<style>
body
{
background-attachment: fixed;
background-image: url("../images/trademark.gif");
background-repeat: no-repeat;
background-position: top left;
}
</style>
<?php
if ($HTTP_COOKIE_VARS["ribosystemsusername"] != "")
{
echo "<h3>Al ingelogd</h3>";
echo "Je bent al ingelogd, nog een keer inloggen is niet nodig";
}
if($username)
{
if(!$password)
{
die("Enter a password<br><a href=\"javascript:history.go(-1)\">Back</a>");
}
if($username != $Wanted_Username)
{
die("Incorrect Details<br><a href=\"javascript:history.go(-1)\">Back</a>");
}
if($password != $Wanted_Password)
{
die("Incorrect Details<br><a href=\"javascript:history.go(-1)\">Back</a>");
}
}
if(!$username) {
?>
<form method="post">
<table align="center">
<tr>
<td width="53"><font size="2">Username:</font></td>
<td width="120"> <font size="2">
<input type=text name=username maxlength=150>
</font></td>
</tr>
<tr>
<td><font size="2">Password:</font></td>
<td><font size="2">
<input type=password name=password>
</font></td>
</tr>
<tr>
<td colspan=2><font size="2">
<input type=submit value="Login">
</font></td>
</tr>
</table>
<div align="right"></div>
</form>
<font size="2">
<?php
die("");
setcookie("ribosystemsusername", "$username", time()+5184000, "/");
}
?>
<br>
<br>
<font size="2"><strong>RiboSystems Client Zone</strong></font> <br>
<?php
include "factoryfox/$username.php";
?> |
Weet iemand mij hierbij te helpen? Alvast bedankt.
Mvg
Timothy B.