smaller or equal to parse error
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
include('db/db.php');
$result = mysql_query("SELECT * FROM user WHERE login='".$_SESSION['login']."' ");
$count = mysql_fetch_assoc($result);
$cc = $count['count'];
if($cc >= 0)
{
if($cc ><= 9)
{
if($cc >= 2)
{
}
else
{
mysql_query("UPDATE user SET level='1' WHERE login='".$_SESSION['login']."' ");
$_SESSION['level'] = 1;
}
}
else
{}
}
?>
include('db/db.php');
$result = mysql_query("SELECT * FROM user WHERE login='".$_SESSION['login']."' ");
$count = mysql_fetch_assoc($result);
$cc = $count['count'];
if($cc >= 0)
{
if($cc ><= 9)
{
if($cc >= 2)
{
}
else
{
mysql_query("UPDATE user SET level='1' WHERE login='".$_SESSION['login']."' ");
$_SESSION['level'] = 1;
}
}
else
{}
}
?>
Parse error: parse error, unexpected T_IS_SMALLER_OR_EQUAL in C:\www\hacker\status_check.php on line 8
waar zit de fouT?
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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
<?php
include('db/db.php');
$result = mysql_query("SELECT * FROM user WHERE login='".$_SESSION['user']."' ");
$count = mysql_fetch_assoc($result);
$cc = $count['count'];
if($cc >= 0)
{
if($cc ><= 9)
{
if($cc >= 2)
{
}
else
{
mysql_query("UPDATE user SET level='1' WHERE login='".$_SESSION['user']."' ");
$_SESSION['level'] = 1;
}
}
else
{}
}
elseif($cc >= 10)
{
if($cc ><= 24)
{
if($cc >= 3)
{
}
else
{
mysql_query("UPDATE user SET level='2' WHERE login='".$_SESSION['user']."' ");
$_SESSION['level'] = 2;
}
}
else
{}
}
elseif($cc >= 25)
{
if($cc ><= 49)
{
if($cc >= 4)
{
}
else
{
mysql_query("UPDATE user SET level='3' WHERE login='".$_SESSION['user']."' ");
$_SESSION['level'] = 3;
}
}
else
{
}
}
elseif($cc >= 50 )
{
if($cc >= 5)
{
}
else
{
mysql_query("UPDATE user SET level='4' WHERE login='".$_SESSION['user']."' ");
$_SESSION['level'] = 4;
}
}
else
{
// give error
}
?>
include('db/db.php');
$result = mysql_query("SELECT * FROM user WHERE login='".$_SESSION['user']."' ");
$count = mysql_fetch_assoc($result);
$cc = $count['count'];
if($cc >= 0)
{
if($cc ><= 9)
{
if($cc >= 2)
{
}
else
{
mysql_query("UPDATE user SET level='1' WHERE login='".$_SESSION['user']."' ");
$_SESSION['level'] = 1;
}
}
else
{}
}
elseif($cc >= 10)
{
if($cc ><= 24)
{
if($cc >= 3)
{
}
else
{
mysql_query("UPDATE user SET level='2' WHERE login='".$_SESSION['user']."' ");
$_SESSION['level'] = 2;
}
}
else
{}
}
elseif($cc >= 25)
{
if($cc ><= 49)
{
if($cc >= 4)
{
}
else
{
mysql_query("UPDATE user SET level='3' WHERE login='".$_SESSION['user']."' ");
$_SESSION['level'] = 3;
}
}
else
{
}
}
elseif($cc >= 50 )
{
if($cc >= 5)
{
}
else
{
mysql_query("UPDATE user SET level='4' WHERE login='".$_SESSION['user']."' ");
$_SESSION['level'] = 4;
}
}
else
{
// give error
}
?>
dit script
Parse error: parse error, unexpected T_IS_SMALLER_OR_EQUAL in C:\www\hacker\status_check.php on line 8
deze fout (sorry van de bump drukte verkeerd wou edit doen
Gewijzigd op 01/01/1970 01:00:00 door Jeroen
Lijkt me sowieso overbodig om dat in een if te zetten, aangezien dat altijd TRUE geeft als het zou werken.
als groter dan of kleiner dan of gelijk is aan 9 (klinkt heel fout mja, dat heb je) dan....
dus ik zou toch maar een keuze maken :P, want zoiets heb ik nog nooit gezien.