Undefined variable:... probleem
Notice: Undefined variable: bericht in /home/loi/public_html/.../includes/functions.php on line 3
schrijf.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?
[code]<?php
error_reporting(E_ALL);
require_once($_SERVER['DOCUMENT_ROOT'].'/.../includes/config.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/.../includes/functions.php');
$ip = $_SERVER['REMOTE_ADDR'];
$datum = date("d/m/Y");
$tijd = date("H:i:s");
ban();
if(isset($_POST["submit"]))
{
if(empty($_POST["naam"]) || empty($_POST["mail"]) || empty($_POST["bericht"]) )
{
echo '<table border="0" align="center">';
echo '<tr valign="middle"><td valign="middle"><font color="#FF0000"><center>Please fill in all of the required fields</font></tr></td>';
echo '<tr valign="middle"><td valign="middle"><a href="javascript:history.go(-1)">Back</a></tr></td></table>';
}
else
{
require_once($_SERVER['DOCUMENT_ROOT'].'/.../includes/functions.php');
spam();
$_POST["naam"] = htmlspecialchars($_POST["naam"]);
$_POST["mail"] = htmlspecialchars($_POST["mail"]);
$insert = "INSERT INTO guestbook (id, ip, naam, mail, website, datum, tijd, bericht) VALUES('','$ip','$_POST[naam]','$_POST[mail]','$_POST[website]','$datum','$tijd','$bericht')";
$query = mysql_query("$insert") or die(mysql_error());
echo '<table border="0" align="center">';
echo "<tr valign=\"middle\"><td valign=\"middle\">$_POST[naam], Message successfully added to the guestbook</tr></td>";
echo "<tr valign=\"middle\"><td valign=\"middle\">You will be redirected in 3 seconds, if it does not, click <a href=\"index.php\">here</a></tr></td></table>";
echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"3\"; url=\"index.php\">";
}
}
else
{
?>
<center><a href="index.php">View the Guestbook</a></center><p></p>
<table width="450" height="150" align="center" border="0">
<tr>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':cool:');"><img src="../includes/smilies/cool.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':beer:');"><img src="../includes/smilies/beer.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':beermug:');"><img src="../includes/smilies/beermug.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':bier:');"><img src="../includes/smilies/bier.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':devil:');"><img src="../includes/smilies/devil2.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':drums:');"><img src="../includes/smilies/drums.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':enjoy:');"><img src="../includes/smilies/enjoy.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':fdup:');"><img src="../includes/smilies/fdup.gif" border="0"></a> </td>
</tr>
<tr>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':fuck:');"><img src="../includes/smilies/fu.gif" border="0"></a> </td>
<td align="center" valign="middle"><a href="javascript:smiley();" onClick="javascript:Invoegen(':gitaar:');"><img src="../includes/smilies/guitar.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':hamer:');"><img src="../includes/smilies/hamer.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':headbang:');"><img src="../includes/smilies/headbang.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':hippy:');"><img src="../includes/smilies/hippy.gif" border="0"></a> </td>
<td align="center" valign="middle"><a href="javascript:smiley();" onClick="javascript:Invoegen(':nice:');"><img src="../includes/smilies/nice.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':puke:');"><img src="../includes/smilies/puke.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':sleep:');"><img src="../includes/smilies/sleep.gif" border="0"></a> </td>
</tr>
<tr>
<td valign="middle" align="center" ><a href="javascript:smiley();" onClick="javascript:Invoegen(':smile:');"><img src="../includes/smilies/smile.gif" border="0"></a> </td>
<td align="center" valign="middle"><a href="javascript:smiley();" onClick="javascript:Invoegen(':smoke:');"><img src="../includes/smilies/smoke.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':tug:');"><img src="../includes/smilies/tug.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':wadde:');"><img src="../includes/smilies/wadde.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':metal:');"><img src="../includes/smilies/metal.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':hit:');"><img src="../includes/smilies/hit.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':kruis:');"><img src="../includes/smilies/crucified.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':sperm:');"><img src="../includes/smilies/sperm.gif" border="0"></a> </td>
</tr>
</td>
</table>
<br>
<form name="gschrijf" method="post" action=" <? $_SERVER['PHP_SELF'] ?> ">
<table border="0" cellpadding="2" cellspacing="2" align="center">
<tr align="center" valign="middle">
<td align="center" valign="middle">
<input type="button" value=" B " onClick="javascript:set('[b][/b]')" style="font-weight:bold; width: 30px" class="button"> 
<input type="button" value=" i " onClick="javascript:set('[i][/i]')" style="font-style:italic; width: 30px" class="button"> 
<input type="button" value=" u " onClick="javascript:set('[u][/u]')" style="text-decoration: underline; width: 30px" class="button">
<input type="button" value="Img" onClick="img()" style="width: 40px" class="button">
<input type="button" value="URL" onClick="url()" style="text-decoration: underline; width: 40px" class="button">
<input type="button" value="E-mail" onClick="email()" style="width:auto" class="button">
</td>
</tr>
</table>
<table border="0" cellpadding="2" cellspacing="2" align="center">
<tr>
<td>
* Name:
</td>
<td>
<input type="text" name="naam" size="35" maxlength="30" class="txt">
</td>
</tr>
<tr>
<td>
* E-mail:
</td>
<td>
<input type="text" name="mail" size="35" maxlength="35" class="txt">
</td>
</tr>
<tr>
<td>
Website:
</td>
<td>
<input type="text" name="website" size="35" maxlength="30" class="txt">
</td>
</tr>
<tr>
<td valign="top">
* Message:
</td>
<td>
<textarea name="bericht" cols="30" rows="7" class="txt"></textarea></td>
</tr>
</table>
<table align="center">
<tr>
<td>
<input type="submit" name="submit" value="Post" class="button" align="absmiddle">
</td>
</tr>
</table>
</form>
<? } ?>
<html>
<head>
<script language="JavaScript">
function smiley() {
return;
}
function Invoegen(Smiley) {
var edit;
var HuidigeTekst = document.gschrijf.bericht.value;
edit = HuidigeTekst+Smiley+" ";
document.gschrijf.bericht.value=edit;
document.gschrijf.bericht.focus();
return;
}
function set(input) {
var text;
var DezeText = document.gschrijf.bericht.value;
text = DezeText+input+" ";
document.gschrijf.bericht.value = text;
document.gschrijf.bericht.focus();
return;
}
function img()
{
var img;
var imgResult;
var text = document.gschrijf.bericht.value;
img = prompt("enter the URL of the image");
imgResult=text+"[img]"+img+"[/img]"+" ";
document.gschrijf.bericht.value = imgResult;
document.gschrijf.bericht.focus();
return;
}
function url()
{
var url;
var urlResult;
var besch ;
var text = document.gschrijf.bericht.value;
besch = prompt("Enter the description of the link:");
url = prompt("Enter the URL of the link: ",'http://');
urlResult=text+"[url="+url+"]"+besch+"[/url]"+" ";
document.gschrijf.bericht.value = urlResult;
document.gschrijf.bericht.focus();
return;
}
function email()
{
var mail;
var mailResult;
var text = document.gschrijf.bericht.value;
mail = prompt("Enter the E-mail: ");
mailResult=text+"[email]"+mail+"[/email]"+" ";
document.gschrijf.bericht.value = mailResult;
document.gschrijf.bericht.focus();
return;
}
</script>
<link rel="stylesheet" href="../includes/css/algemeen.css" type="text/css">
</head>
?>
[code]<?php
error_reporting(E_ALL);
require_once($_SERVER['DOCUMENT_ROOT'].'/.../includes/config.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/.../includes/functions.php');
$ip = $_SERVER['REMOTE_ADDR'];
$datum = date("d/m/Y");
$tijd = date("H:i:s");
ban();
if(isset($_POST["submit"]))
{
if(empty($_POST["naam"]) || empty($_POST["mail"]) || empty($_POST["bericht"]) )
{
echo '<table border="0" align="center">';
echo '<tr valign="middle"><td valign="middle"><font color="#FF0000"><center>Please fill in all of the required fields</font></tr></td>';
echo '<tr valign="middle"><td valign="middle"><a href="javascript:history.go(-1)">Back</a></tr></td></table>';
}
else
{
require_once($_SERVER['DOCUMENT_ROOT'].'/.../includes/functions.php');
spam();
$_POST["naam"] = htmlspecialchars($_POST["naam"]);
$_POST["mail"] = htmlspecialchars($_POST["mail"]);
$insert = "INSERT INTO guestbook (id, ip, naam, mail, website, datum, tijd, bericht) VALUES('','$ip','$_POST[naam]','$_POST[mail]','$_POST[website]','$datum','$tijd','$bericht')";
$query = mysql_query("$insert") or die(mysql_error());
echo '<table border="0" align="center">';
echo "<tr valign=\"middle\"><td valign=\"middle\">$_POST[naam], Message successfully added to the guestbook</tr></td>";
echo "<tr valign=\"middle\"><td valign=\"middle\">You will be redirected in 3 seconds, if it does not, click <a href=\"index.php\">here</a></tr></td></table>";
echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"3\"; url=\"index.php\">";
}
}
else
{
?>
<center><a href="index.php">View the Guestbook</a></center><p></p>
<table width="450" height="150" align="center" border="0">
<tr>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':cool:');"><img src="../includes/smilies/cool.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':beer:');"><img src="../includes/smilies/beer.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':beermug:');"><img src="../includes/smilies/beermug.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':bier:');"><img src="../includes/smilies/bier.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':devil:');"><img src="../includes/smilies/devil2.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':drums:');"><img src="../includes/smilies/drums.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':enjoy:');"><img src="../includes/smilies/enjoy.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':fdup:');"><img src="../includes/smilies/fdup.gif" border="0"></a> </td>
</tr>
<tr>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':fuck:');"><img src="../includes/smilies/fu.gif" border="0"></a> </td>
<td align="center" valign="middle"><a href="javascript:smiley();" onClick="javascript:Invoegen(':gitaar:');"><img src="../includes/smilies/guitar.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':hamer:');"><img src="../includes/smilies/hamer.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':headbang:');"><img src="../includes/smilies/headbang.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':hippy:');"><img src="../includes/smilies/hippy.gif" border="0"></a> </td>
<td align="center" valign="middle"><a href="javascript:smiley();" onClick="javascript:Invoegen(':nice:');"><img src="../includes/smilies/nice.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':puke:');"><img src="../includes/smilies/puke.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':sleep:');"><img src="../includes/smilies/sleep.gif" border="0"></a> </td>
</tr>
<tr>
<td valign="middle" align="center" ><a href="javascript:smiley();" onClick="javascript:Invoegen(':smile:');"><img src="../includes/smilies/smile.gif" border="0"></a> </td>
<td align="center" valign="middle"><a href="javascript:smiley();" onClick="javascript:Invoegen(':smoke:');"><img src="../includes/smilies/smoke.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':tug:');"><img src="../includes/smilies/tug.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':wadde:');"><img src="../includes/smilies/wadde.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':metal:');"><img src="../includes/smilies/metal.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':hit:');"><img src="../includes/smilies/hit.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':kruis:');"><img src="../includes/smilies/crucified.gif" border="0"></a> </td>
<td valign="middle" align="center"><a href="javascript:smiley();" onClick="javascript:Invoegen(':sperm:');"><img src="../includes/smilies/sperm.gif" border="0"></a> </td>
</tr>
</td>
</table>
<br>
<form name="gschrijf" method="post" action=" <? $_SERVER['PHP_SELF'] ?> ">
<table border="0" cellpadding="2" cellspacing="2" align="center">
<tr align="center" valign="middle">
<td align="center" valign="middle">
<input type="button" value=" B " onClick="javascript:set('[b][/b]')" style="font-weight:bold; width: 30px" class="button"> 
<input type="button" value=" i " onClick="javascript:set('[i][/i]')" style="font-style:italic; width: 30px" class="button"> 
<input type="button" value=" u " onClick="javascript:set('[u][/u]')" style="text-decoration: underline; width: 30px" class="button">
<input type="button" value="Img" onClick="img()" style="width: 40px" class="button">
<input type="button" value="URL" onClick="url()" style="text-decoration: underline; width: 40px" class="button">
<input type="button" value="E-mail" onClick="email()" style="width:auto" class="button">
</td>
</tr>
</table>
<table border="0" cellpadding="2" cellspacing="2" align="center">
<tr>
<td>
* Name:
</td>
<td>
<input type="text" name="naam" size="35" maxlength="30" class="txt">
</td>
</tr>
<tr>
<td>
* E-mail:
</td>
<td>
<input type="text" name="mail" size="35" maxlength="35" class="txt">
</td>
</tr>
<tr>
<td>
Website:
</td>
<td>
<input type="text" name="website" size="35" maxlength="30" class="txt">
</td>
</tr>
<tr>
<td valign="top">
* Message:
</td>
<td>
<textarea name="bericht" cols="30" rows="7" class="txt"></textarea></td>
</tr>
</table>
<table align="center">
<tr>
<td>
<input type="submit" name="submit" value="Post" class="button" align="absmiddle">
</td>
</tr>
</table>
</form>
<? } ?>
<html>
<head>
<script language="JavaScript">
function smiley() {
return;
}
function Invoegen(Smiley) {
var edit;
var HuidigeTekst = document.gschrijf.bericht.value;
edit = HuidigeTekst+Smiley+" ";
document.gschrijf.bericht.value=edit;
document.gschrijf.bericht.focus();
return;
}
function set(input) {
var text;
var DezeText = document.gschrijf.bericht.value;
text = DezeText+input+" ";
document.gschrijf.bericht.value = text;
document.gschrijf.bericht.focus();
return;
}
function img()
{
var img;
var imgResult;
var text = document.gschrijf.bericht.value;
img = prompt("enter the URL of the image");
imgResult=text+"[img]"+img+"[/img]"+" ";
document.gschrijf.bericht.value = imgResult;
document.gschrijf.bericht.focus();
return;
}
function url()
{
var url;
var urlResult;
var besch ;
var text = document.gschrijf.bericht.value;
besch = prompt("Enter the description of the link:");
url = prompt("Enter the URL of the link: ",'http://');
urlResult=text+"[url="+url+"]"+besch+"[/url]"+" ";
document.gschrijf.bericht.value = urlResult;
document.gschrijf.bericht.focus();
return;
}
function email()
{
var mail;
var mailResult;
var text = document.gschrijf.bericht.value;
mail = prompt("Enter the E-mail: ");
mailResult=text+"[email]"+mail+"[/email]"+" ";
document.gschrijf.bericht.value = mailResult;
document.gschrijf.bericht.focus();
return;
}
</script>
<link rel="stylesheet" href="../includes/css/algemeen.css" type="text/css">
</head>
?>
functions.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
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
<?
//smileys
$bericht = htmlspecialchars($bericht);
$bericht = str_replace(":beer:","<img src=\"../includes/smilies/beer.gif\">",$bericht);
$bericht = str_replace(":beermug:","<img src=\"../includes/smilies/beermug.gif\">",$bericht);
$bericht = str_replace(":bier:","<img src=\"../includes/smilies/bier.gif\">",$bericht);
$bericht = str_replace(":cool:","<img src=\"../includes/smilies/cool.gif\">",$bericht);
$bericht = str_replace(":devil:","<img src=\"../includes/smilies/devil2.gif\">",$bericht);
$bericht = str_replace(":drums:","<img src=\"../includes/smilies/drums.gif\">",$bericht);
$bericht = str_replace(":enjoy:","<img src=\"../includes/smilies/enjoy.gif\">",$bericht);
$bericht = str_replace(":fdup:","<img src=\"../includes/smilies/fdup.gif\">",$bericht);
$bericht = str_replace(":fuck:","<img src=\"../includes/smilies/fu.gif\">",$bericht);
$bericht = str_replace(":gitaar:","<img src=\"../includes/smilies/guitar.gif\">",$bericht);
$bericht = str_replace(":hamer:","<img src=\"../includes/smilies/hamer.gif\">",$bericht);
$bericht = str_replace(":headbang:","<img src=\"../includes/smilies/headbang.gif\">",$bericht);
$bericht = str_replace(":hippy:","<img src=\"../includes/smilies/hippy.gif\">",$bericht);
$bericht = str_replace(":nice:","<img src=\"../includes/smilies/nice.gif\">",$bericht);
$bericht = str_replace(":puke:","<img src=\"../includes/smilies/puke.gif\">",$bericht);
$bericht = str_replace(":sleep:","<img src=\"../includes/smilies/sleep.gif\">",$bericht);
$bericht = str_replace(":smile:","<img src=\"../includes/smilies/smile.gif\">",$bericht);
$bericht = str_replace(":smoke:","<img src=\"../includes/smilies/smoke.gif\">",$bericht);
$bericht = str_replace(":tug:","<img src=\"../includes/smilies/tug.gif\">",$bericht);
$bericht = str_replace(":wadde:","<img src=\"../includes/smilies/wadde.gif\">",$bericht);
$bericht = str_replace(":metal:","<img src=\"../includes/smilies/metal.gif\">",$bericht);
$bericht = str_replace(":hit:","<img src=\"../includes/smilies/hit.gif\">",$bericht);
$bericht = str_replace(":kruis:","<img src=\"../includes/smilies/crucified.gif\">",$bericht);
$bericht = str_replace(":sperm:","<img src=\"../includes/smilies/sperm.gif\">",$bericht);
?>
//smileys
$bericht = htmlspecialchars($bericht);
$bericht = str_replace(":beer:","<img src=\"../includes/smilies/beer.gif\">",$bericht);
$bericht = str_replace(":beermug:","<img src=\"../includes/smilies/beermug.gif\">",$bericht);
$bericht = str_replace(":bier:","<img src=\"../includes/smilies/bier.gif\">",$bericht);
$bericht = str_replace(":cool:","<img src=\"../includes/smilies/cool.gif\">",$bericht);
$bericht = str_replace(":devil:","<img src=\"../includes/smilies/devil2.gif\">",$bericht);
$bericht = str_replace(":drums:","<img src=\"../includes/smilies/drums.gif\">",$bericht);
$bericht = str_replace(":enjoy:","<img src=\"../includes/smilies/enjoy.gif\">",$bericht);
$bericht = str_replace(":fdup:","<img src=\"../includes/smilies/fdup.gif\">",$bericht);
$bericht = str_replace(":fuck:","<img src=\"../includes/smilies/fu.gif\">",$bericht);
$bericht = str_replace(":gitaar:","<img src=\"../includes/smilies/guitar.gif\">",$bericht);
$bericht = str_replace(":hamer:","<img src=\"../includes/smilies/hamer.gif\">",$bericht);
$bericht = str_replace(":headbang:","<img src=\"../includes/smilies/headbang.gif\">",$bericht);
$bericht = str_replace(":hippy:","<img src=\"../includes/smilies/hippy.gif\">",$bericht);
$bericht = str_replace(":nice:","<img src=\"../includes/smilies/nice.gif\">",$bericht);
$bericht = str_replace(":puke:","<img src=\"../includes/smilies/puke.gif\">",$bericht);
$bericht = str_replace(":sleep:","<img src=\"../includes/smilies/sleep.gif\">",$bericht);
$bericht = str_replace(":smile:","<img src=\"../includes/smilies/smile.gif\">",$bericht);
$bericht = str_replace(":smoke:","<img src=\"../includes/smilies/smoke.gif\">",$bericht);
$bericht = str_replace(":tug:","<img src=\"../includes/smilies/tug.gif\">",$bericht);
$bericht = str_replace(":wadde:","<img src=\"../includes/smilies/wadde.gif\">",$bericht);
$bericht = str_replace(":metal:","<img src=\"../includes/smilies/metal.gif\">",$bericht);
$bericht = str_replace(":hit:","<img src=\"../includes/smilies/hit.gif\">",$bericht);
$bericht = str_replace(":kruis:","<img src=\"../includes/smilies/crucified.gif\">",$bericht);
$bericht = str_replace(":sperm:","<img src=\"../includes/smilies/sperm.gif\">",$bericht);
?>
weet iemand hoe ik dit oplos??
Thx
Gewijzigd op 14/11/2005 21:15:00 door Wesley
De fout zit namelijk in bestand functions.php op line 3. Dit is schrijf.php.
Het is een notice, en het betekent dat je variabele niet gedeclareert is...
Op te lossen erboven ergens de variabele aan te maken:
Dit voldoet al volgens mij
Gewijzigd op 31/10/2005 00:35:00 door Willem Jan Z
Sommigen doen net alsof het een parse error is!!!
Zet dan neer $_POST['bericht'] ipv $bericht...
Notice: Undefined index: bericht in /home/loi/public_html/.../includes/functions.php on line 4
Gewijzigd op 14/11/2005 21:16:00 door Wesley
?????????
Zet functions.php eens neer...
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
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
<?
//smileys
$bericht = "";
$bericht = htmlspecialchars($_POST['bericht']);
$bericht = str_replace(":beer:","<img src=\"../includes/smilies/beer.gif\">",$bericht);
$bericht = str_replace(":beermug:","<img src=\"../includes/smilies/beermug.gif\">",$bericht);
$bericht = str_replace(":bier:","<img src=\"../includes/smilies/bier.gif\">",$bericht);
$bericht = str_replace(":cool:","<img src=\"../includes/smilies/cool.gif\">",$bericht);
$bericht = str_replace(":devil:","<img src=\"../includes/smilies/devil2.gif\">",$bericht);
$bericht = str_replace(":drums:","<img src=\"../includes/smilies/drums.gif\">",$bericht);
$bericht = str_replace(":enjoy:","<img src=\"../includes/smilies/enjoy.gif\">",$bericht);
$bericht = str_replace(":fdup:","<img src=\"../includes/smilies/fdup.gif\">",$bericht);
$bericht = str_replace(":fuck:","<img src=\"../includes/smilies/fu.gif\">",$bericht);
$bericht = str_replace(":gitaar:","<img src=\"../includes/smilies/guitar.gif\">",$bericht);
$bericht = str_replace(":hamer:","<img src=\"../includes/smilies/hamer.gif\">",$bericht);
$bericht = str_replace(":headbang:","<img src=\"../includes/smilies/headbang.gif\">",$bericht);
$bericht = str_replace(":hippy:","<img src=\"../includes/smilies/hippy.gif\">",$bericht);
$bericht = str_replace(":nice:","<img src=\"../includes/smilies/nice.gif\">",$bericht);
$bericht = str_replace(":puke:","<img src=\"../includes/smilies/puke.gif\">",$bericht);
$bericht = str_replace(":sleep:","<img src=\"../includes/smilies/sleep.gif\">",$bericht);
$bericht = str_replace(":smile:","<img src=\"../includes/smilies/smile.gif\">",$bericht);
$bericht = str_replace(":smoke:","<img src=\"../includes/smilies/smoke.gif\">",$bericht);
$bericht = str_replace(":tug:","<img src=\"../includes/smilies/tug.gif\">",$bericht);
$bericht = str_replace(":wadde:","<img src=\"../includes/smilies/wadde.gif\">",$bericht);
$bericht = str_replace(":metal:","<img src=\"../includes/smilies/metal.gif\">",$bericht);
$bericht = str_replace(":hit:","<img src=\"../includes/smilies/hit.gif\">",$bericht);
$bericht = str_replace(":kruis:","<img src=\"../includes/smilies/crucified.gif\">",$bericht);
$bericht = str_replace(":sperm:","<img src=\"../includes/smilies/sperm.gif\">",$bericht);
//end smiley
//ubb
$bericht = str_replace("[b]","<b>",$bericht);
$bericht = str_replace("[/b]","</b>",$bericht);
$bericht = str_replace("[i]","<i>",$bericht);
$bericht = str_replace("[/i]","</i>",$bericht);
$bericht = str_replace("[u]","<u>",$bericht);
$bericht = str_replace("[/u]","</u>",$bericht);
$bericht = preg_replace("/\[img\](.*?)\[\/img\]/si", "<img src=\"\\1\" border=\"0\">",$bericht);
$bericht = preg_replace("/(\[url=)(.*)(])(.*)(\[\/url\])/siU", "<a href=\"\\2\" target=_blank>\\4</a>",$bericht);
$bericht = preg_replace("/(\[email\])(.*)(\[\/email\])/U","<a href=\"mailto:\\2\">\\2</a>", $bericht);
//end ubb
?>
//smileys
$bericht = "";
$bericht = htmlspecialchars($_POST['bericht']);
$bericht = str_replace(":beer:","<img src=\"../includes/smilies/beer.gif\">",$bericht);
$bericht = str_replace(":beermug:","<img src=\"../includes/smilies/beermug.gif\">",$bericht);
$bericht = str_replace(":bier:","<img src=\"../includes/smilies/bier.gif\">",$bericht);
$bericht = str_replace(":cool:","<img src=\"../includes/smilies/cool.gif\">",$bericht);
$bericht = str_replace(":devil:","<img src=\"../includes/smilies/devil2.gif\">",$bericht);
$bericht = str_replace(":drums:","<img src=\"../includes/smilies/drums.gif\">",$bericht);
$bericht = str_replace(":enjoy:","<img src=\"../includes/smilies/enjoy.gif\">",$bericht);
$bericht = str_replace(":fdup:","<img src=\"../includes/smilies/fdup.gif\">",$bericht);
$bericht = str_replace(":fuck:","<img src=\"../includes/smilies/fu.gif\">",$bericht);
$bericht = str_replace(":gitaar:","<img src=\"../includes/smilies/guitar.gif\">",$bericht);
$bericht = str_replace(":hamer:","<img src=\"../includes/smilies/hamer.gif\">",$bericht);
$bericht = str_replace(":headbang:","<img src=\"../includes/smilies/headbang.gif\">",$bericht);
$bericht = str_replace(":hippy:","<img src=\"../includes/smilies/hippy.gif\">",$bericht);
$bericht = str_replace(":nice:","<img src=\"../includes/smilies/nice.gif\">",$bericht);
$bericht = str_replace(":puke:","<img src=\"../includes/smilies/puke.gif\">",$bericht);
$bericht = str_replace(":sleep:","<img src=\"../includes/smilies/sleep.gif\">",$bericht);
$bericht = str_replace(":smile:","<img src=\"../includes/smilies/smile.gif\">",$bericht);
$bericht = str_replace(":smoke:","<img src=\"../includes/smilies/smoke.gif\">",$bericht);
$bericht = str_replace(":tug:","<img src=\"../includes/smilies/tug.gif\">",$bericht);
$bericht = str_replace(":wadde:","<img src=\"../includes/smilies/wadde.gif\">",$bericht);
$bericht = str_replace(":metal:","<img src=\"../includes/smilies/metal.gif\">",$bericht);
$bericht = str_replace(":hit:","<img src=\"../includes/smilies/hit.gif\">",$bericht);
$bericht = str_replace(":kruis:","<img src=\"../includes/smilies/crucified.gif\">",$bericht);
$bericht = str_replace(":sperm:","<img src=\"../includes/smilies/sperm.gif\">",$bericht);
//end smiley
//ubb
$bericht = str_replace("[b]","<b>",$bericht);
$bericht = str_replace("[/b]","</b>",$bericht);
$bericht = str_replace("[i]","<i>",$bericht);
$bericht = str_replace("[/i]","</i>",$bericht);
$bericht = str_replace("[u]","<u>",$bericht);
$bericht = str_replace("[/u]","</u>",$bericht);
$bericht = preg_replace("/\[img\](.*?)\[\/img\]/si", "<img src=\"\\1\" border=\"0\">",$bericht);
$bericht = preg_replace("/(\[url=)(.*)(])(.*)(\[\/url\])/siU", "<a href=\"\\2\" target=_blank>\\4</a>",$bericht);
$bericht = preg_replace("/(\[email\])(.*)(\[\/email\])/U","<a href=\"mailto:\\2\">\\2</a>", $bericht);
//end ubb
?>
Gewoon zo, zou moeten werken..
Zet anders bovenaan de pagina: error_reporting(0)
Notice: Undefined index: bericht in /home/loi/public_html/.../includes/functions.php on line 4
Gewijzigd op 14/11/2005 21:16:00 door Wesley
error_reporting(E_ALL ^ E_NOTICE);
neer, en dan laat ie die notices niet meer zien
En je weet zeker dat het bericht gepost is?
thx, de notice is weg :d
Hij is niet meer te zien, maar niet weg...