Captcha will maar niet werken
Ben bezig met een klein scriptje om m'n online game hacks in te zetten. Tot zover werkt het allemaal wel lekker, inclusief de reacties posten. Alleen wil captcha maar niet werken op de reageer pagina :
http://www.devolusion.nl/hacks/index.php?pagina=hacks/reageer&id=11
Hieronder mijn code van reageer.php :
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
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
<?
if($submit){
$insert = "INSERT INTO reacties (id, nieuws_id, poster, bericht) VALUES('','$id','$_POST[poster]','$_POST[bericht]')";
$query = mysql_query($insert)or die(mysql_error());
echo "<b>$_POST[poster]</b>.<br>Thanks for taking your time to add a comment.";
}else{
$connect = mysql_query("SELECT * FROM downloadsysteem WHERE id='$id'");
while($get = mysql_fetch_array($connect)) {
?><?php
session_start();
?><?php
if (empty($_POST)) { ?>
<form method="post" name="form">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="16%">Your name</td>
<td width="84%"><label>
<input name="nieuws_id" type="hidden" value="<?=$get['id']?>">
</label>
<label>
<input type="text" name="poster" id="poster">
</label></td>
</tr>
<tr>
<td>Website (http://)</td>
<td> </td>
</tr>
<tr>
<td height="19">Email :</td>
<td> </td>
</tr>
<tr>
<td>Comment :</td>
<td><label>
<input type="text" name="bericht" id="bericht">
</label></td>
</tr>
<tr>
<td height="8" valign="top">Security measures:</td>
<td><img src="hacks/securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>"><br />
<input type="text" name="code" /><br /></td>
</tr>
<tr>
<td height="9"> </td>
<td><input type="submit" name="submit" value="Add comment"></td>
</tr>
</table>
</form><?php
} else { //form is gepost
include("/hacks/securimage.php");
$img = new Securimage();
$valid = $img->check($_POST['code']);
if($valid == true) {
echo "<center>Thanks, you entered the correct code.</center>";
} else {
echo "<center>Sorry, the code you entered was invalid. <a href=\"javascript:history.go(-1)\">Go back</a> to try again.</center>";
}
}
?>
<?php
} }
?>
if($submit){
$insert = "INSERT INTO reacties (id, nieuws_id, poster, bericht) VALUES('','$id','$_POST[poster]','$_POST[bericht]')";
$query = mysql_query($insert)or die(mysql_error());
echo "<b>$_POST[poster]</b>.<br>Thanks for taking your time to add a comment.";
}else{
$connect = mysql_query("SELECT * FROM downloadsysteem WHERE id='$id'");
while($get = mysql_fetch_array($connect)) {
?><?php
session_start();
?><?php
if (empty($_POST)) { ?>
<form method="post" name="form">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="16%">Your name</td>
<td width="84%"><label>
<input name="nieuws_id" type="hidden" value="<?=$get['id']?>">
</label>
<label>
<input type="text" name="poster" id="poster">
</label></td>
</tr>
<tr>
<td>Website (http://)</td>
<td> </td>
</tr>
<tr>
<td height="19">Email :</td>
<td> </td>
</tr>
<tr>
<td>Comment :</td>
<td><label>
<input type="text" name="bericht" id="bericht">
</label></td>
</tr>
<tr>
<td height="8" valign="top">Security measures:</td>
<td><img src="hacks/securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>"><br />
<input type="text" name="code" /><br /></td>
</tr>
<tr>
<td height="9"> </td>
<td><input type="submit" name="submit" value="Add comment"></td>
</tr>
</table>
</form><?php
} else { //form is gepost
include("/hacks/securimage.php");
$img = new Securimage();
$valid = $img->check($_POST['code']);
if($valid == true) {
echo "<center>Thanks, you entered the correct code.</center>";
} else {
echo "<center>Sorry, the code you entered was invalid. <a href=\"javascript:history.go(-1)\">Go back</a> to try again.</center>";
}
}
?>
<?php
} }
?>
Iemand een idee waar ik de fout in ben gegaan ? Alvast bedankt !
Er zijn nog geen reacties op dit bericht.