help me
zodra ik iemandcrewlid wil maken of juist niet en ik klik erop gebeurt er niks :S
hier is het script:
Code (php)
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
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
<?php /* ------------------------- */
include ("_include-config.php");
if(! check_login()) {
header("Location: login.php");
exit;
}
if($data->level <= 3) {
header("Location: magniet.php");
exit;
}
mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'");
/* ------------------------- */ ?>
<html>
<head>
<title>Streetcrime</title>
<link rel="stylesheet" type="text/css" href="<?php echo ($_COOKIE['v'] == 2) ? "css-v2.css" : "css-v1.css"; ?>">
</head>
<body style="background: #FFFFFF; margin: 0px;">
<center>
<FORM METHOD=post ACTION="">
gebruikersnaam:<br>
<INPUT name="admin" type="text" VALUE="" maxlength="16" style="width: 150;"><center>
<INPUT name="submit2" type="submit" VALUE="Maak Crewlid">
<INPUT name="submit1" type="submit" VALUE="Maak Lid">
<br></FORM>
</center>
<?PHP
echo "
</body>
</font>
</html>";
?>
<?PHP
if (isset($_POST['submit2'])) {
$insert = "UPDATE `[users]` SET `level`=`level`=3 WHERE `login` = '$admin'";
$insert_now = mysql_query($insert) or die("FOUT : " . mysql_error());
echo "U hebt $admin Crewlid gemaakt";
exit;
}
?>
<?PHP
if (isset($_POST['submit1'])) {
$insert = "UPDATE `[users]` SET `level`=`level`=1 WHERE `login` = '$admin'";
$insert_now = mysql_query($insert) or die("FOUT : " . mysql_error());
echo "$admin is geen Crewlid meer";
exit;
}
?>
</body>
</html>
include ("_include-config.php");
if(! check_login()) {
header("Location: login.php");
exit;
}
if($data->level <= 3) {
header("Location: magniet.php");
exit;
}
mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'");
/* ------------------------- */ ?>
<html>
<head>
<title>Streetcrime</title>
<link rel="stylesheet" type="text/css" href="<?php echo ($_COOKIE['v'] == 2) ? "css-v2.css" : "css-v1.css"; ?>">
</head>
<body style="background: #FFFFFF; margin: 0px;">
<center>
<FORM METHOD=post ACTION="">
gebruikersnaam:<br>
<INPUT name="admin" type="text" VALUE="" maxlength="16" style="width: 150;"><center>
<INPUT name="submit2" type="submit" VALUE="Maak Crewlid">
<INPUT name="submit1" type="submit" VALUE="Maak Lid">
<br></FORM>
</center>
<?PHP
echo "
</body>
</font>
</html>";
?>
<?PHP
if (isset($_POST['submit2'])) {
$insert = "UPDATE `[users]` SET `level`=`level`=3 WHERE `login` = '$admin'";
$insert_now = mysql_query($insert) or die("FOUT : " . mysql_error());
echo "U hebt $admin Crewlid gemaakt";
exit;
}
?>
<?PHP
if (isset($_POST['submit1'])) {
$insert = "UPDATE `[users]` SET `level`=`level`=1 WHERE `login` = '$admin'";
$insert_now = mysql_query($insert) or die("FOUT : " . mysql_error());
echo "$admin is geen Crewlid meer";
exit;
}
?>
</body>
</html>
wat is dit? level`=`level`=1
UPDATE users SET level = '1' WHERE login = '".$admin."' ";
en wat opmaak in je code kan ook geen kwaad.
Gewijzigd op 01/01/1970 01:00:00 door Jan geen
Maikel zouw je de volgende keer een wat beetere topic titel kunnen kiezen?
Code (php)
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
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
<?php
include("_include-config.php");
if(!check_login()) {
header("Location: login.php");
exit;
}
if($data->level <= 3) {
header("Location: magniet.php");
exit;
}
mysql_query("UPDATE users SET online = NOW() WHERE login = '".$data->login."' ");
?>
<html>
<head>
<title>Streetcrime</title>
<link rel="stylesheet" type="text/css" href="<?php echo ($_COOKIE['v'] == 2) ? "css-v2.css" : "css-v1.css"; ?>">
</head>
<body style="background: #FFFFFF; margin: 0px;">
<form method="POST" action="<?php $_SERVER['PHP_SELF']; ?>">
Gebruikersnaam:<br>
<input name="gebruiker" type="text" value="" maxlength="16" style="width: 150px;"><br />
<input type="radio" name="niv" value="1" /> Lid<br />
<input type="radio" name="niv" value="3" /> Crewlid<br />
<input name="submit" type="submit" value="Update" />
</form>
</center>
</body>
</font>
</html>
<?PHP
if($_SERVER['REQUEST_METHOD'] == "POST") {
$valid = array(1,3);
if(in_array($_POST['niv'], $valid)) {
$query = "UPDATE users SET level = '".$_POST['niv']."' WHERE login = '".strip_tags($_POST['gebruiker'])."' ";
$result = mysql_query($query) or die("FOUT : " . mysql_error());
echo "U hebt " . strip_tags($_POST['gebruiker']) . " Crewlid gemaakt";
} else {
echo "Geen geldig niveau..";
}
}
?>
include("_include-config.php");
if(!check_login()) {
header("Location: login.php");
exit;
}
if($data->level <= 3) {
header("Location: magniet.php");
exit;
}
mysql_query("UPDATE users SET online = NOW() WHERE login = '".$data->login."' ");
?>
<html>
<head>
<title>Streetcrime</title>
<link rel="stylesheet" type="text/css" href="<?php echo ($_COOKIE['v'] == 2) ? "css-v2.css" : "css-v1.css"; ?>">
</head>
<body style="background: #FFFFFF; margin: 0px;">
<form method="POST" action="<?php $_SERVER['PHP_SELF']; ?>">
Gebruikersnaam:<br>
<input name="gebruiker" type="text" value="" maxlength="16" style="width: 150px;"><br />
<input type="radio" name="niv" value="1" /> Lid<br />
<input type="radio" name="niv" value="3" /> Crewlid<br />
<input name="submit" type="submit" value="Update" />
</form>
</center>
</body>
</font>
</html>
<?PHP
if($_SERVER['REQUEST_METHOD'] == "POST") {
$valid = array(1,3);
if(in_array($_POST['niv'], $valid)) {
$query = "UPDATE users SET level = '".$_POST['niv']."' WHERE login = '".strip_tags($_POST['gebruiker'])."' ";
$result = mysql_query($query) or die("FOUT : " . mysql_error());
echo "U hebt " . strip_tags($_POST['gebruiker']) . " Crewlid gemaakt";
} else {
echo "Geen geldig niveau..";
}
}
?>
zoiets? veel plezier ermee :)
Gewijzigd op 01/01/1970 01:00:00 door Jan geen