gastenboek met verplichte e-mail
Ik zit met de volgende vraag...
Ik heb een gastenboek, maar om anonieme posts te weren wil ik het volgende doen. De posters zijn verplicht om hun e-mailadres op te geven. Wanneer ze dat hebben gedaan en hun bericht hebben ingetypt, dan moet in hun mailbox een e-mail met een link aankomen. Pas als ze op die link klikken kan hun bericht zichtbaar worden in het gastenboek. Hoe zou ik dit moeten doen??
Quote:
<table width="550" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="150" class="top_left"><a href="frame_gastenboek.php?method=getmsg"><img src="icons/icon_bericht.gif" border="0"></a></td>
<td width="610" class="top_right"></td>
</tr>
<tr>
<td class="middle_left"><p class="top"><font color="#009966">Naam:</font></p></td>
<td class="middle_right"><p class="top"><font color="#009966">Bericht:</font></p></td>
</tr>
</table>
<table width="550" border="1px" bordercolor="#000000" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="148" rowspan="2" class="message_left"></td>
<td width="608" class="message_righttop"></td>
</tr>
<tr>
<td class="message_rightbottom">
<a href="" target="_blank"><img src="icons/icon_www.gif" border="0"></a>
<a href="mailto:"><img src="icons/icon_email.gif" border="0"></a> <img src="icons/icon_www.gif" border="0">
<a href="mailto:"><img src="icons/icon_email.gif" border="0"></a> <a href="" target="_blank"><img src="icons/icon_www.gif" border="0"></a>
</td>
</tr>
<head>
<META HTTP-EQUIV='Refresh' CONTENT='1 URL=frame_gastenboek.php'>
</head>
<BODY>
Een ogenblik a.u.b.<br>
Uw bericht wordt toegevoegd.....
<table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
<form action="frame_gastenboek.php?method=addmsg" method="post">
<tr>
<td class="form_top" colspan="2"><h1>Teken het gastenboek<br><br></h1></td>
</tr>
<tr>
<td class="form_left"><p class="form">Naam:</p></td>
<td class="form_right"><input type='text' name="name" size='25' maxlength='25'><br></td>
</tr>
<tr>
<td class="form_left">E-Mail:</td>
<td class="form_right"><input type='text' name='email' size='25' maxlength='75'><br></td>
</tr>
<tr>
<td class="form_left">Homepage:</td>
<td class="form_right"><input type='text' name='home' size='25' maxlength='50'></td>
</tr>
<tr>
<td class="form_left"><p class="form">Bericht:</td>
<td class="form_right"><TEXTAREA name="message" rows=5 cols=40 onSelect="markSelection(this);" onClick="markSelection(this);" onKeyUp="markSelection(this);"></TEXTAREA>
</td>
</tr>
<tr>
<td class="form_left"> </td>
<td class="form_right">
<A href="#" onclick="javascript:insert_emoticon('message', ':)')"><img src="msn_emoticons\msn_happy.gif" border="0" align='absmiddle'></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':d')"><img src="msn_emoticons\msn_grinning.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ';)')"><img src="msn_emoticons\msn_winking.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':o')"><img src="msn_emoticons\msn_surprised.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':p')"><img src="msn_emoticons\msn_tongue.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(h)')"><img src="msn_emoticons\msn_shades.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':@')"><img src="msn_emoticons\msn_angry.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':s')"><img src="msn_emoticons\msn_smirking.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':$')"><img src="msn_emoticons\msn_embarrassed.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':(')"><img src="msn_emoticons\msn_sad.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':/')"><img src="msn_emoticons\msn_crying.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(s)')"><img src="msn_emoticons\msn_moon.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(a)')"><img src="msn_emoticons\msn_angel.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(i)')"><img src="msn_emoticons\msn_bulb.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(k)')"><img src="msn_emoticons\msn_kiss.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(r)')"><img src="msn_emoticons\msn_445.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(p)')"><img src="msn_emoticons\msn_444.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(1)')"><img src="msn_emoticons\msn_517.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(z)')"><img src="msn_emoticons\msn_392.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(e)')"><img src="msn_emoticons\msn_399.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(t)')"><img src="msn_emoticons\msn_429.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(y)')"><img src="msn_emoticons\msn_438.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(u)')"><img src="msn_emoticons\msn_473.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(o)')"><img src="msn_emoticons\msn_488.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(q)')"><img src="msn_emoticons\msn_499.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(d)')"><img src="msn_emoticons\msn_451.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(f)')"><img src="msn_emoticons\msn_534.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(g)')"><img src="msn_emoticons\msn_684.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(h)')"><img src="msn_emoticons\msn_1549.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(j)')"><img src="msn_emoticons\msn_1761.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(m)')"><img src="msn_emoticons\msn_1896.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(w)')"><img src="msn_emoticons\msn_1827.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(x)')"><img src="msn_emoticons\msn_2136.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(c)')"><img src="msn_emoticons\msn_2168.gif" border="0" align="absmiddle"></A>
<SCRIPT language="jscript">
function markSelection(txtObj) {
if(txtObj.createTextRange) {
txtObj.caretPos = document.selection.createRange().duplicate();
isSelected = true;
}
}
function insert_emoticon(txtName, emoticon) {
var txtObj = eval("document.forms[0]." + txtName);
if(txtObj.createTextRange && txtObj.caretPos) {
txtObj.caretPos.text = emoticon;
txtObj.focus();
}
}
</SCRIPT>
<br>
<br>
</td>
</tr>
<tr>
<td class="form_bottom" colspan="2"><input type="submit" name="submit" value="Post bericht"><br><br></td>
</tr>
</form>
</table>
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
include("connect.inc");
$sql_query = mysql_query("SELECT * FROM guestbook ORDER BY id DESC");
$num_messages = mysql_num_rows($sql_query);
if($num_messages == '') {
$num_messages = "0";
}
$num_per_page = 10;
$num_pages = ceil($num_messages/$num_per_page);
if($num_pages == '0') {
$num_pages = 1;
}
if(!isset($current_page)) {
$current_page = 1;
}
?>
include("connect.inc");
$sql_query = mysql_query("SELECT * FROM guestbook ORDER BY id DESC");
$num_messages = mysql_num_rows($sql_query);
if($num_messages == '') {
$num_messages = "0";
}
$num_per_page = 10;
$num_pages = ceil($num_messages/$num_per_page);
if($num_pages == '0') {
$num_pages = 1;
}
if(!isset($current_page)) {
$current_page = 1;
}
?>
<table width="550" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="150" class="top_left"><a href="frame_gastenboek.php?method=getmsg"><img src="icons/icon_bericht.gif" border="0"></a></td>
<td width="610" class="top_right">
Code (php)
1
<? echo "Pagina ".$current_page." van ".$num_pages." ".$num_messages." bericht(en) gepost."; ?>
</tr>
<tr>
<td class="middle_left"><p class="top"><font color="#009966">Naam:</font></p></td>
<td class="middle_right"><p class="top"><font color="#009966">Bericht:</font></p></td>
</tr>
</table>
<table width="550" border="1px" bordercolor="#000000" cellspacing="0" cellpadding="0" align="center">
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
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
<?
switch($HTTP_GET_VARS["method"]) {
case "getmsg":
GetMessage();
break;
case "addmsg":
AddMessage();
break;
default:
ShowMessage();
}
function ShowMessage() {
global $current_page;
global $num_per_page;
global $num_messages;
$start_value = ($current_page * 10) - 10;
$sql_retrieve = mysql_query("SELECT * FROM guestbook ORDER BY id DESC LIMIT $start_value, 10");
while($object = mysql_fetch_object($sql_retrieve)) {
$message = "$object->message";
$name = "$object->name";
$email = "$object->email";
$home = "$object->home";
$time = "$object->time";
$date = "$object->date";
$ip = "gelogd";
include("msn_emoticons.ubb");
?>
switch($HTTP_GET_VARS["method"]) {
case "getmsg":
GetMessage();
break;
case "addmsg":
AddMessage();
break;
default:
ShowMessage();
}
function ShowMessage() {
global $current_page;
global $num_per_page;
global $num_messages;
$start_value = ($current_page * 10) - 10;
$sql_retrieve = mysql_query("SELECT * FROM guestbook ORDER BY id DESC LIMIT $start_value, 10");
while($object = mysql_fetch_object($sql_retrieve)) {
$message = "$object->message";
$name = "$object->name";
$email = "$object->email";
$home = "$object->home";
$time = "$object->time";
$date = "$object->date";
$ip = "gelogd";
include("msn_emoticons.ubb");
?>
<tr>
<td width="148" rowspan="2" class="message_left"></td>
<td width="608" class="message_righttop"></td>
</tr>
<tr>
<td class="message_rightbottom">
Code (php)
<a href="" target="_blank"><img src="icons/icon_www.gif" border="0"></a>
<a href="mailto:"><img src="icons/icon_email.gif" border="0"></a> <img src="icons/icon_www.gif" border="0">
<a href="mailto:"><img src="icons/icon_email.gif" border="0"></a> <a href="" target="_blank"><img src="icons/icon_www.gif" border="0"></a>
</td>
</tr>
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
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
<?
}
}
function AddMessage() {
global $submit;
global $name;
global $message;
global $home;
global $email;
global $ip;
global $HTTP_SERVER_VARS;
if($submit) {
if($name == '') {
echo "U heeft geen naam ingevuld.";
} else if($message == '') {
echo "U heeft geen bericht ingevuld.";
} else {
$ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];
$day = date("j");
$month = date("m");
$year = date("Y");
$space = " ";
$month = str_replace("01", "Januari", $month);
$month = str_replace("02", "Februari", $month);
$month = str_replace("03", "Maart", $month);
$month = str_replace("04", "April", $month);
$month = str_replace("05", "Mei", $month);
$month = str_replace("06", "Juni", $month);
$month = str_replace("07", "Juli", $month);
$month = str_replace("08", "Augustus", $month);
$month = str_replace("09", "September", $month);
$month = str_replace("10", "Oktober", $month);
$month = str_replace("11", "November", $month);
$month = str_replace("12", "December", $month);
$time = date("H:i:s");
$date = $day.$space.$month.$space.$year;
$message = $_POST["message"];
$name = $_POST["name"];
$sql = "INSERT INTO guestbook (id, ip, name, email, home, date, time, message) VALUES ('', '$ip', '$name', '$email', '$home', '$date', '$time', '$message')";
mysql_query($sql) or die("Kan geen verbinding maken met de tabel");
?>
}
}
function AddMessage() {
global $submit;
global $name;
global $message;
global $home;
global $email;
global $ip;
global $HTTP_SERVER_VARS;
if($submit) {
if($name == '') {
echo "U heeft geen naam ingevuld.";
} else if($message == '') {
echo "U heeft geen bericht ingevuld.";
} else {
$ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];
$day = date("j");
$month = date("m");
$year = date("Y");
$space = " ";
$month = str_replace("01", "Januari", $month);
$month = str_replace("02", "Februari", $month);
$month = str_replace("03", "Maart", $month);
$month = str_replace("04", "April", $month);
$month = str_replace("05", "Mei", $month);
$month = str_replace("06", "Juni", $month);
$month = str_replace("07", "Juli", $month);
$month = str_replace("08", "Augustus", $month);
$month = str_replace("09", "September", $month);
$month = str_replace("10", "Oktober", $month);
$month = str_replace("11", "November", $month);
$month = str_replace("12", "December", $month);
$time = date("H:i:s");
$date = $day.$space.$month.$space.$year;
$message = $_POST["message"];
$name = $_POST["name"];
$sql = "INSERT INTO guestbook (id, ip, name, email, home, date, time, message) VALUES ('', '$ip', '$name', '$email', '$home', '$date', '$time', '$message')";
mysql_query($sql) or die("Kan geen verbinding maken met de tabel");
?>
<head>
<META HTTP-EQUIV='Refresh' CONTENT='1 URL=frame_gastenboek.php'>
</head>
<BODY>
Een ogenblik a.u.b.<br>
Uw bericht wordt toegevoegd.....
Code (php)
<table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
<form action="frame_gastenboek.php?method=addmsg" method="post">
<tr>
<td class="form_top" colspan="2"><h1>Teken het gastenboek<br><br></h1></td>
</tr>
<tr>
<td class="form_left"><p class="form">Naam:</p></td>
<td class="form_right"><input type='text' name="name" size='25' maxlength='25'><br></td>
</tr>
<tr>
<td class="form_left">E-Mail:</td>
<td class="form_right"><input type='text' name='email' size='25' maxlength='75'><br></td>
</tr>
<tr>
<td class="form_left">Homepage:</td>
<td class="form_right"><input type='text' name='home' size='25' maxlength='50'></td>
</tr>
<tr>
<td class="form_left"><p class="form">Bericht:</td>
<td class="form_right"><TEXTAREA name="message" rows=5 cols=40 onSelect="markSelection(this);" onClick="markSelection(this);" onKeyUp="markSelection(this);"></TEXTAREA>
</td>
</tr>
<tr>
<td class="form_left"> </td>
<td class="form_right">
<A href="#" onclick="javascript:insert_emoticon('message', ':)')"><img src="msn_emoticons\msn_happy.gif" border="0" align='absmiddle'></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':d')"><img src="msn_emoticons\msn_grinning.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ';)')"><img src="msn_emoticons\msn_winking.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':o')"><img src="msn_emoticons\msn_surprised.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':p')"><img src="msn_emoticons\msn_tongue.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(h)')"><img src="msn_emoticons\msn_shades.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':@')"><img src="msn_emoticons\msn_angry.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':s')"><img src="msn_emoticons\msn_smirking.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':$')"><img src="msn_emoticons\msn_embarrassed.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':(')"><img src="msn_emoticons\msn_sad.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', ':/')"><img src="msn_emoticons\msn_crying.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(s)')"><img src="msn_emoticons\msn_moon.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(a)')"><img src="msn_emoticons\msn_angel.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(i)')"><img src="msn_emoticons\msn_bulb.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(k)')"><img src="msn_emoticons\msn_kiss.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(r)')"><img src="msn_emoticons\msn_445.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(p)')"><img src="msn_emoticons\msn_444.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(1)')"><img src="msn_emoticons\msn_517.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(z)')"><img src="msn_emoticons\msn_392.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(e)')"><img src="msn_emoticons\msn_399.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(t)')"><img src="msn_emoticons\msn_429.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(y)')"><img src="msn_emoticons\msn_438.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(u)')"><img src="msn_emoticons\msn_473.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(o)')"><img src="msn_emoticons\msn_488.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(q)')"><img src="msn_emoticons\msn_499.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(d)')"><img src="msn_emoticons\msn_451.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(f)')"><img src="msn_emoticons\msn_534.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(g)')"><img src="msn_emoticons\msn_684.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(h)')"><img src="msn_emoticons\msn_1549.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(j)')"><img src="msn_emoticons\msn_1761.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(m)')"><img src="msn_emoticons\msn_1896.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(w)')"><img src="msn_emoticons\msn_1827.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(x)')"><img src="msn_emoticons\msn_2136.gif" border="0" align="absmiddle"></A>
<A href="#" onclick="javascript:insert_emoticon('message', '(c)')"><img src="msn_emoticons\msn_2168.gif" border="0" align="absmiddle"></A>
<SCRIPT language="jscript">
function markSelection(txtObj) {
if(txtObj.createTextRange) {
txtObj.caretPos = document.selection.createRange().duplicate();
isSelected = true;
}
}
function insert_emoticon(txtName, emoticon) {
var txtObj = eval("document.forms[0]." + txtName);
if(txtObj.createTextRange && txtObj.caretPos) {
txtObj.caretPos.text = emoticon;
txtObj.focus();
}
}
</SCRIPT>
<br>
<br>
</td>
</tr>
<tr>
<td class="form_bottom" colspan="2"><input type="submit" name="submit" value="Post bericht"><br><br></td>
</tr>
</form>
</table>
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
}
if(!isset($current_page)) {
$current_page = 1;
}
if($current_page != 1){
$prev_page = $current_page-1;
$prev = '<a href="frame_gastenboek.php?current_page='.$prev_page.'">Vorige</a> :';
} else {
$prev = "Vorige :";
}
if(($num_messages - ($num_per_page * $current_page)) > 0) {
$next_page = $current_page+1;
$next = ': <a href="frame_gastenboek.php?current_page='.$next_page.'">Volgende</a>';
} else {
$next = ": Volgende";
}
?>
}
if(!isset($current_page)) {
$current_page = 1;
}
if($current_page != 1){
$prev_page = $current_page-1;
$prev = '<a href="frame_gastenboek.php?current_page='.$prev_page.'">Vorige</a> :';
} else {
$prev = "Vorige :";
}
if(($num_messages - ($num_per_page * $current_page)) > 0) {
$next_page = $current_page+1;
$next = ': <a href="frame_gastenboek.php?current_page='.$next_page.'">Volgende</a>';
} else {
$next = ": Volgende";
}
?>
bij activatie=0 (standaard) wordt er nix geprint, en bij activatie=1 dus wel.
je kan hierbij in een activatie email dus ervoor zorgen dat door een link de activatie op 1 wordt gezet.
door bijvoorbeeld een tijd erbij te schrijven in de database die je ook in de email gebruikt.. zo kan niet elke willekeurige gek een bericht activeren.
zo wordt het dus activatie.php?tijd=_tijd_die_ook_database_staat_
Als $_GET['tijd'] dus overeen komt dan laat je activatie=0 updaten naar activatie=1.
het kan natuurlijk op nog veel meer manieren.. ik hoop trouwens niet dat ik moet voorkauwen hoe je die tijd ( time() ) in de link moet zetten en weg hoeft te schrijven en hoe je een mailtje stuurt... anders kan het erg ingewikkeld worden.
er staat trouwens ook een activatie script van Bas op deze site als ik het me goed herinner, dus effe zoeken in Scripts :)
Gewijzigd op 11/02/2004 20:48:00 door PHP erik