Aanmeldformulier gameclan
Ik heb een website voor een gameclan. Ik wil daar nu een aanmeldformulier op plaatsen. Op de form-to-mail manier. Ik ben niet zo bedreven in php en heb al in diverse website gezocht naar oplossingen maar ik kan maar niet het juiste antwoord vinden of de antwoorden zijn niet eenduidig.
De ingevulde gegevens wil ik op een geordende manier in een e-mail verwerken. Ik krijg het maar niet voor elkaar om de gevens van mijn HTML pagina via de PHP pagina in mijn mailbox te krijgen.
Weet iemand raad? Ik hoop echt zo dat iemand mij kan helpen....
Zitten er fouten in en waar dan? Ik ben ten einde raad.
Dit is de PHP pagina die de gevens uit mijn HTML formulier naar mijn mailbox moet sturen:
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
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
<?
// ------------- CONFIGURABLE SECTION ------------------------
// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "[email protected]" ;
$mailto = '[email protected]' ;
// $subject - set to the Subject line of the email, eg
//$subject = "E-mail from www.example.com" ;
$subject = "E-mail from www.example.com" ;
// the pages to be displayed, eg
//$formurl = "http://www.example.com/feedback.html" ;
//$errorurl = "http://www.example.com/error.html" ;
//$thankyouurl = "http://www.example.com/thankyou.html" ;
$formurl = "http://www.example.com/feedback.html" ;
$errorurl = "http://http://www.example.com/error.html" ;
$thankyouurl = "http://www.example.com/thankyou.html" ;
$uself = 0;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$r_Naam = $_POST['r_Naam'] ;
$r_Geboortedatum = $_POST['r_Geboortedatum'] ;
$r_Woonplaats = $_POST['r_Woonplaats'] ;
$re_E-mail = $_POST['re_E-mail'] ;
$MSN = $_POST['MSN'] ;
$Xfire = $_POST['Xfire'] ;
$r_AA_Username = $_POST['r_AA_Username'] ;
$r_Honor = $_POST['r_Honor'] ;
$r_ArmyOps_Tracker_account = $_POST['r_ArmyOps_Tracker_account'] ;
$r_Hoe_lang_speel_je_AA = $_POST['r_Hoe_lang_speel_je_AA'] ;
$r_Je_kent_BBS_via = $_POST['r_Je_kent_BBS_via'] ;
$r_Reden_waarom_je_lid_wilt_worden = $_POST['r_Reden_waarom_je_lid_wilt_worden'] ;
$m_Basic_Combat_Training[] = $_POST['m_Basic_Combat_Training[]'] ;
$m_Adv__Individual_Training[] = $_POST['m_Adv__Individual_Training[]'] ;
$m_Adv__Marksmanship[] = $_POST['m_Adv__Marksmanship[]'] ;
$m_Airborne_School[] = $_POST['m_Airborne_School[]'] ;
$m_Medic_Training[] = $_POST['m_Medic_Training[]'] ;
$m_Special_Forces_Training[] = $_POST['m_Special_Forces_Training[]'] ;
$r_Ik_heb_de_BBS_Regels_gelezen_en = $_POST['r_Ik_heb_de_BBS_Regels_gelezen_en'] ;
$Opmerkingen = $_POST['Opmerkingen'] ;
$http_referrer = getenv( "HTTP_REFERER" );
$messageproper =
"Dit bericht werd verzonden vanaf:\n" .
"$http_referrer\n" .
"\n\n----------- PERSOONLIJKE GEGEVENS -----------\n\n" .
"Naam: $r_Naam\n" .
"Geboortedatum: $r_Geboortedatum\n" .
"Woonplaats: $r_Woonplaats\n" .
"E-mail: $re_E-mail\n" .
"MSN: $MSN\n" .
"Xfire: $Xfire\n" .
"\n\n-------------- AMERICA'S ARMY --------------\n\n" .
"AA Username: $r_AA_Username\n" .
"Honor: $r_Honor\n" .
"ArmyOps Tracker account: $r_ArmyOps_Tracker_account\n" .
"Hoe lang speel je AA: $r_Hoe_lang_speel_je_AA\n" .
"Je kent BBS via: $r_Je_kent_BBS_via\n" .
"Reden waarom je lid wilt worden: \n" .
"$r_Reden_waarom_je_lid_wilt_worden\n" .
"\n\n---------------- TRAININGEN ----------------\n\n" .
"Basic Combat Training: \n" .
"$m_Basic_Combat_Training[]\n" .
"Adv. Individual Training: \n" .
"$m_Adv__Individual_Training[]\n" .
"Adv. Marksmanship: \n" .
"$m_Adv__Marksmanship[]\n" .
"Airborne School: \n" .
"$m_Airborne_School[]\n" .
"Medic Training: \n" .
"$m_Medic_Training[]\n" .
"Special Forces Training: \n" .
"$m_Special_Forces_Training[]\n" .
"\n\n---------------- BBS REGELS ----------------\n\n" .
"Ik heb de BBS Regels gelezen en: $r_Ik_heb_de_BBS_Regels_gelezen_en\n" .
"\n\n---------------- OPMERKINGEN ----------------\n\n" .
"$Opmerkingen\n" .
"\n\n---------------------------------------------\n" ;
mail($mailto, $subject, $messageproper,
"From: \"$r_Naam\" <$re_E-mail>" . $headersep . "Reply-To: \"$r_Naam\" <$re_E-mail>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
header( "Location: $thankyouurl" );
exit ;
?>
// ------------- CONFIGURABLE SECTION ------------------------
// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "[email protected]" ;
$mailto = '[email protected]' ;
// $subject - set to the Subject line of the email, eg
//$subject = "E-mail from www.example.com" ;
$subject = "E-mail from www.example.com" ;
// the pages to be displayed, eg
//$formurl = "http://www.example.com/feedback.html" ;
//$errorurl = "http://www.example.com/error.html" ;
//$thankyouurl = "http://www.example.com/thankyou.html" ;
$formurl = "http://www.example.com/feedback.html" ;
$errorurl = "http://http://www.example.com/error.html" ;
$thankyouurl = "http://www.example.com/thankyou.html" ;
$uself = 0;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$r_Naam = $_POST['r_Naam'] ;
$r_Geboortedatum = $_POST['r_Geboortedatum'] ;
$r_Woonplaats = $_POST['r_Woonplaats'] ;
$re_E-mail = $_POST['re_E-mail'] ;
$MSN = $_POST['MSN'] ;
$Xfire = $_POST['Xfire'] ;
$r_AA_Username = $_POST['r_AA_Username'] ;
$r_Honor = $_POST['r_Honor'] ;
$r_ArmyOps_Tracker_account = $_POST['r_ArmyOps_Tracker_account'] ;
$r_Hoe_lang_speel_je_AA = $_POST['r_Hoe_lang_speel_je_AA'] ;
$r_Je_kent_BBS_via = $_POST['r_Je_kent_BBS_via'] ;
$r_Reden_waarom_je_lid_wilt_worden = $_POST['r_Reden_waarom_je_lid_wilt_worden'] ;
$m_Basic_Combat_Training[] = $_POST['m_Basic_Combat_Training[]'] ;
$m_Adv__Individual_Training[] = $_POST['m_Adv__Individual_Training[]'] ;
$m_Adv__Marksmanship[] = $_POST['m_Adv__Marksmanship[]'] ;
$m_Airborne_School[] = $_POST['m_Airborne_School[]'] ;
$m_Medic_Training[] = $_POST['m_Medic_Training[]'] ;
$m_Special_Forces_Training[] = $_POST['m_Special_Forces_Training[]'] ;
$r_Ik_heb_de_BBS_Regels_gelezen_en = $_POST['r_Ik_heb_de_BBS_Regels_gelezen_en'] ;
$Opmerkingen = $_POST['Opmerkingen'] ;
$http_referrer = getenv( "HTTP_REFERER" );
$messageproper =
"Dit bericht werd verzonden vanaf:\n" .
"$http_referrer\n" .
"\n\n----------- PERSOONLIJKE GEGEVENS -----------\n\n" .
"Naam: $r_Naam\n" .
"Geboortedatum: $r_Geboortedatum\n" .
"Woonplaats: $r_Woonplaats\n" .
"E-mail: $re_E-mail\n" .
"MSN: $MSN\n" .
"Xfire: $Xfire\n" .
"\n\n-------------- AMERICA'S ARMY --------------\n\n" .
"AA Username: $r_AA_Username\n" .
"Honor: $r_Honor\n" .
"ArmyOps Tracker account: $r_ArmyOps_Tracker_account\n" .
"Hoe lang speel je AA: $r_Hoe_lang_speel_je_AA\n" .
"Je kent BBS via: $r_Je_kent_BBS_via\n" .
"Reden waarom je lid wilt worden: \n" .
"$r_Reden_waarom_je_lid_wilt_worden\n" .
"\n\n---------------- TRAININGEN ----------------\n\n" .
"Basic Combat Training: \n" .
"$m_Basic_Combat_Training[]\n" .
"Adv. Individual Training: \n" .
"$m_Adv__Individual_Training[]\n" .
"Adv. Marksmanship: \n" .
"$m_Adv__Marksmanship[]\n" .
"Airborne School: \n" .
"$m_Airborne_School[]\n" .
"Medic Training: \n" .
"$m_Medic_Training[]\n" .
"Special Forces Training: \n" .
"$m_Special_Forces_Training[]\n" .
"\n\n---------------- BBS REGELS ----------------\n\n" .
"Ik heb de BBS Regels gelezen en: $r_Ik_heb_de_BBS_Regels_gelezen_en\n" .
"\n\n---------------- OPMERKINGEN ----------------\n\n" .
"$Opmerkingen\n" .
"\n\n---------------------------------------------\n" ;
mail($mailto, $subject, $messageproper,
"From: \"$r_Naam\" <$re_E-mail>" . $headersep . "Reply-To: \"$r_Naam\" <$re_E-mail>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
header( "Location: $thankyouurl" );
exit ;
?>
Ik wil onderstaande HTML pagina op mijn website plaatsen zodat men de gegevens kan invullen:
<HTML>
<HEAD><SCRIPT LANGUAGE = "JavaScript">
function isFilled(str){ return (str != ""); }
function isEmail(str) { return (str.indexOf(".") > 2) && (str.indexOf("@") > 0); }
function isDigital(str) { return(parseFloat(str,10)==(str*1)); }
function isCurrency(val) { var re = /^(\$?\d+\$?|\$?\d+\.\d+\$?)$/; return (re.test(val)); }
function ValidForm(form) {
var field, i;
var req = new Array(11);
var email = new Array(1);
var digits = new Array(0);
var currs = new Array(0);
req[0] = "r_Naam";
req[1] = "r_Geboortedatum";
req[2] = "r_Woonplaats";
req[3] = "re_E-mail";
req[4] = "r_AA_Username";
req[5] = "r_Honor";
req[6] = "r_ArmyOps_Tracker_account";
req[7] = "r_Hoe_lang_speel_je_AA";
req[8] = "r_Je_kent_BBS_via";
req[9] = "r_Reden_waarom_je_lid_wilt_worden";
req[10] = "r_Ik_heb_de_BBS_Regels_gelezen_en";
email[0] = "re_E-mail";
for (i=0;i<11;i++) {
eval("field = form." + req);
if (!isFilled(field.value)) {
alert("Field '" + field.title + "' is required to be filled in before successful submission.");
field.focus();
return false;
break;
}}
for (i=0;i<1;i++) {
eval("field = form." + email);
if (!isEmail(field.value)) {
alert("Field '" + field.title + "' is required to be filled in with valid email addresses before successful submission.");
field.focus();
return false;
break;
}}
for (i=0;i<0;i++) {
eval("field = form." + digits);
if (!isDigital(field.value)) {
alert("Field " + field.title + " is required to be filled in only with digits (0-9) and decimal point before successful submission.");
field.focus();
return false;
break;
}}
for (i=0;i<0;i++) {
eval("field = form." + currs);
if (!isCurrency(field.value)) {
alert("Field " + field.title + " is required to be filled in only with digits (0-9) a decimal point, or a dollar sign before successful submission.");
field.focus();
return false;
break;
}}
return true; }
</SCRIPT>
<TITLE>LID WORDEN</TITLE>
</HEAD>
<BODY bgcolor="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<BASEFONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="center" valign="middle"><td><!-- header -->
<h1>LID WORDEN</h1>
<!-- /header -->
<table border="0" cellpadding="0" cellspacing="0" class="border">
<tr><td class="bg_color">
<div class="margins">
<FORM ACTION="http://www.example.com/lidworden.php" METHOD="POST" ENCTYPE="multipart/form-data" onsubmit="return ValidForm(this);">
<TABLE BORDER="10" BORDERCOLOR="#C0C0C0" CELLPADDING="5" CELLSPACING="0">
<tr>
<td bgcolor="#C0C0C0" colspan="2"><FONT SIZE="2" COLOR="000000" FACE="Verdana,Arial"><B>PERSOONLIJKE GEGEVENS</FONT></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Naam</FONT><font color="#FF0000">*</font></td>
<td bgcolor="#C0C0C0"><input type="text" size="25" name="r_Naam" value="" title="Naam"></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Geboortedatum</FONT><font color="#FF0000">*</font></td>
<td bgcolor="#C0C0C0"><input type="text" size="25" name="r_Geboortedatum" value="" title="Geboortedatum"></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Woonplaats</FONT><font color="#FF0000">*</font></td>
<td bgcolor="#C0C0C0"><input type="text" size="25" name="r_Woonplaats" value="" title="Woonplaats"></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">E-mail</FONT><font color="#FF0000">*</font></td>
<td bgcolor="#C0C0C0"><input type="text" size="25" name="re_E-mail" value="" title="E-mail"></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">MSN</FONT></td>
<td bgcolor="#C0C0C0"><input type="text" size="25" name="MSN" value="" title="MSN"></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Xfire</FONT></td>
<td bgcolor="#C0C0C0"><input type="text" size="25" name="Xfire" value="" title="Xfire"></td>
</tr>
<tr>
<td bgcolor="#C0C0C0" colspan="2"><FONT SIZE="2" COLOR="000000" FACE="Verdana,Arial"><B>AMERICA'S ARMY</FONT></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">AA Username</FONT><font color="#FF0000">*</font></td>
<td bgcolor="#C0C0C0"><input type="text" size="25" name="r_AA_Username" value="" title="AA Username"></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Honor</FONT><font color="#FF0000">*</font></td>
<td bgcolor="#C0C0C0"><input type="text" size="25" name="r_Honor" value="" title="Honor"></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">ArmyOps Tracker account</FONT><font color="#FF0000">*</font></td>
<td bgcolor="#C0C0C0" nowrap><select name="r_ArmyOps_Tracker_account" title="ArmyOps Tracker account">
<option value='Maak keuze'>- Maak keuze -</option>
<option value='Ja'>Ja</option>
<option value='Nee'>Nee</option>
<option value='Wat is ArmyOps Tracker?'>Wat is ArmyOps Tracker?</option>
</select>
</td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Hoe lang speel je AA</FONT><font color="#FF0000">*</font></td>
<td bgcolor="#C0C0C0"><input type="text" size="25" name="r_Hoe_lang_speel_je_AA" value="" title="Hoe lang speel je AA"></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Je kent BBS via</FONT><font color="#FF0000">*</font></td>
<td bgcolor="#C0C0C0" nowrap><select name="r_Je_kent_BBS_via" title="Je kent BBS via">
<option value='Maak keuze'>- Maak keuze -</option>
<option value='America's Army'>America's Army</option>
<option value='ArmyOps Tracker'>ArmyOps Tracker</option>
<option value='BBS Gameserver'>BBS Gameserver</option>
<option value='Clanlid/leden'>Clanlid/leden</option>
<option value='Andere clan'>Andere clan</option>
<option value='Internet'>Internet</option>
</select>
</td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Reden waarom je lid wilt worden</FONT><font color="#FF0000">*</font></td>
<td bgcolor="#C0C0C0"><textarea rows="5" cols="25" name="r_Reden_waarom_je_lid_wilt_worden"></textarea></td>
</tr>
<tr>
<td bgcolor="#C0C0C0" colspan="2"><FONT SIZE="2" COLOR="000000" FACE="Verdana,Arial"><b>Vul in welke trainingen je hebt afgerond.</FONT></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Basic Combat Training</FONT></td>
<td bgcolor="#C0C0C0">
<input type="checkbox" name="m_Basic_Combat_Training[]" value="Basic Rifle Marksmanship" title="Basic Combat Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Basic Rifle Marksmanship</FONT><br>
<input type="checkbox" name="m_Basic_Combat_Training[]" value="Eagle Tower" title="Basic Combat Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Eagle Tower</FONT><br>
<input type="checkbox" name="m_Basic_Combat_Training[]" value="Weapons Familiarization" title="Basic Combat Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Weapons Familiarization</FONT><br>
<input type="checkbox" name="m_Basic_Combat_Training[]" value="MOUT Shoothouse" title="Basic Combat Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">MOUT Shoothouse</FONT><br>
</td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Adv. Individual Training</FONT></td>
<td bgcolor="#C0C0C0">
<input type="checkbox" name="m_Adv__Individual_Training[]" value="Javelin Training" title="Adv. Individual Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Javelin Training</FONT><br>
<input type="checkbox" name="m_Adv__Individual_Training[]" value="HMMWV Driver" title="Adv. Individual Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">HMMWV Driver</FONT><br>
<input type="checkbox" name="m_Adv__Individual_Training[]" value="CROWS Gunner" title="Adv. Individual Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">CROWS Gunner</FONT><br>
</td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Adv. Marksmanship</FONT></td>
<td bgcolor="#C0C0C0">
<input type="checkbox" name="m_Adv__Marksmanship[]" value="M-24" title="Adv. Marksmanship"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">M-24</FONT><br>
<input type="checkbox" name="m_Adv__Marksmanship[]" value="M-82" title="Adv. Marksmanship"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">M-82</FONT><br>
</td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Airborne School</FONT></td>
<td bgcolor="#C0C0C0">
<input type="checkbox" name="m_Airborne_School[]" value="250' Tower" title="Airborne School"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">250' Tower</FONT><br>
<input type="checkbox" name="m_Airborne_School[]" value="Live Jump" title="Airborne School"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Live Jump</FONT><br>
</td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Medic Training</FONT></td>
<td bgcolor="#C0C0C0">
<input type="checkbox" name="m_Medic_Training[]" value="Airway Management" title="Medic Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Airway Management</FONT><br>
<input type="checkbox" name="m_Medic_Training[]" value="Control Bleeding" title="Medic Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Control Bleeding</FONT><br>
<input type="checkbox" name="m_Medic_Training[]" value="Treat Shock" title="Medic Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Treat Shock</FONT><br>
<input type="checkbox" name="m_Medic_Training[]" value="Field Training" title="Medic Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Field Training</FONT><br>
</td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Special Forces Training</FONT></td>
<td bgcolor="#C0C0C0">
<input type="checkbox" name="m_Special_Forces_Training[]" value="Camp Mackall" title="Special Forces Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Camp Mackall</FONT><br>
<input type="checkbox" name="m_Special_Forces_Training[]" value="SF Escape & Evade" title="Special Forces Training"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">SF Escape & Evade</FONT><br>
</td>
</tr>
<tr>
<td bgcolor="#C0C0C0" colspan="2"><FONT SIZE="2" COLOR="000000" FACE="Verdana,Arial"><b>Lees de BBS regels in ons forum!</FONT></td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Ik heb de BBS Regels gelezen en</FONT><font color="#FF0000">*</font></td>
<td bgcolor="#C0C0C0">
<input type="radio" name="r_Ik_heb_de_BBS_Regels_gelezen_en" value="ik ga akkoord" checked title="Ik heb de BBS Regels gelezen en"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">ik ga akkoord</FONT><br>
<input type="radio" name="r_Ik_heb_de_BBS_Regels_gelezen_en" value="ik ga niet akkoord" title="Ik heb de BBS Regels gelezen en"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">ik ga niet akkoord</FONT><br>
</td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><FONT SIZE="1" COLOR="000000" FACE="Verdana,Arial">Opmerkingen</FONT></td>
<td bgcolor="#C0C0C0"><textarea rows="5" cols="25" name="Opmerkingen"></textarea></td>
</tr>
<tr>
<td bgcolor="#C0C0C0" colspan="2"><CENTER><INPUT TYPE="SUBMIT" VALUE="Verzenden"><INPUT TYPE="RESET" VALUE="Annuleren"></td>
</tr>
</table>
</FORM>
</div>
</td></tr>
</table>
</td></tr>
</table>
</body>
</html>
Gewijzigd op 01/01/1970 01:00:00 door Hinthammer
Post even de relevante code(dus het mail gedeelte) en niet je 2000 regel code.
http://www.phphulp.nl/php/scripts/1/331/
En maak er een HTML email van en zet er tabellen in zodat je alles netjes kan ordenen
Vergeet niet HTML header mee te geven maar die kan jeo ok vinden in dat script
Kijk eens naar Dit script: En maak er een HTML email van en zet er tabellen in zodat je alles netjes kan ordenen
Vergeet niet HTML header mee te geven maar die kan jeo ok vinden in dat script
Is mijn script niet goed of moet er nog wat in verbetert worden; dat wil ik weten, aub....
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
$mailto = '[email protected]' ;
// $subject - set to the Subject line of the email, eg
//$subject = "E-mail from www.example.com" ;
$subject = "E-mail from www.example.com" ;
// the pages to be displayed, eg
//$formurl = "http://www.example.com/feedback.html" ;
//$errorurl = "http://www.example.com/error.html" ;
//$thankyouurl = "http://www.example.com/thankyou.html" ;
$formurl = "http://www.example.com/feedback.html" ;
$errorurl = "http://http://www.example.com/error.html" ;
$thankyouurl = "http://www.example.com/thankyou.html" ;
$uself = 0;
?>
$mailto = '[email protected]' ;
// $subject - set to the Subject line of the email, eg
//$subject = "E-mail from www.example.com" ;
$subject = "E-mail from www.example.com" ;
// the pages to be displayed, eg
//$formurl = "http://www.example.com/feedback.html" ;
//$errorurl = "http://www.example.com/error.html" ;
//$thankyouurl = "http://www.example.com/thankyou.html" ;
$formurl = "http://www.example.com/feedback.html" ;
$errorurl = "http://http://www.example.com/error.html" ;
$thankyouurl = "http://www.example.com/thankyou.html" ;
$uself = 0;
?>
Heb je ook al in je spambox gekeken? daar komen ze namelijk ook vaak aan.
In de HTML pagina staat dit:
<FORM ACTION="http://www.example.com/lidworden.php" METHOD="POST" ENCTYPE="multipart/form-data" onsubmit="return ValidForm(this);">
Dus dat klopt ook????
Dus het script zou gewoon moeten werken?
Je ziet geen rare dingen zodat hij bijvoorbeeld de invoer niet kan ophalen of zo?
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
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
<?
// ------------- CONFIGURABLE SECTION ------------------------
// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "[email protected]" ;
$mailto = '[email protected]' ;
// $subject - set to the Subject line of the email, eg
//$subject = "E-mail from www.example.com" ;
$subject = "E-mail from www.example.com" ;
// the pages to be displayed, eg
//$formurl = "http://www.example.com/feedback.html" ;
//$errorurl = "http://www.example.com/error.html" ;
//$thankyouurl = "http://www.example.com/thankyou.html" ;
$formurl = "http://www.example.com/feedback.html" ;
$errorurl = "http://http://www.example.com/error.html" ;
$thankyouurl = "http://www.example.com/thankyou.html" ;
$uself = 0;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$r_Naam = $_POST['r_Naam'] ;
$r_Geboortedatum = $_POST['r_Geboortedatum'] ;
$r_Woonplaats = $_POST['r_Woonplaats'] ;
$re_E-mail = $_POST['re_E-mail'] ;
$MSN = $_POST['MSN'] ;
$Xfire = $_POST['Xfire'] ;
$r_AA_Username = $_POST['r_AA_Username'] ;
$r_Honor = $_POST['r_Honor'] ;
$r_ArmyOps_Tracker_account = $_POST['r_ArmyOps_Tracker_account'] ;
$r_Hoe_lang_speel_je_AA = $_POST['r_Hoe_lang_speel_je_AA'] ;
$r_Je_kent_BBS_via = $_POST['r_Je_kent_BBS_via'] ;
$r_Reden_waarom_je_lid_wilt_worden = $_POST['r_Reden_waarom_je_lid_wilt_worden'] ;
$m_Basic_Combat_Training[] = $_POST['m_Basic_Combat_Training[]'] ;
$m_Adv__Individual_Training[] = $_POST['m_Adv__Individual_Training[]'] ;
$m_Adv__Marksmanship[] = $_POST['m_Adv__Marksmanship[]'] ;
$m_Airborne_School[] = $_POST['m_Airborne_School[]'] ;
$m_Medic_Training[] = $_POST['m_Medic_Training[]'] ;
$m_Special_Forces_Training[] = $_POST['m_Special_Forces_Training[]'] ;
$r_Ik_heb_de_BBS_Regels_gelezen_en = $_POST['r_Ik_heb_de_BBS_Regels_gelezen_en'] ;
$Opmerkingen = $_POST['Opmerkingen'] ;
$http_referrer = getenv( "HTTP_REFERER" );
$messageproper =
"Dit bericht werd verzonden vanaf:\n" .
"$http_referrer\n" .
"\n\n----------- PERSOONLIJKE GEGEVENS -----------\n\n" .
"Naam: $r_Naam\n" .
"Geboortedatum: $r_Geboortedatum\n" .
"Woonplaats: $r_Woonplaats\n" .
"E-mail: $re_E-mail\n" .
"MSN: $MSN\n" .
"Xfire: $Xfire\n" .
"\n\n-------------- AMERICA'S ARMY --------------\n\n" .
"AA Username: $r_AA_Username\n" .
"Honor: $r_Honor\n" .
"ArmyOps Tracker account: $r_ArmyOps_Tracker_account\n" .
"Hoe lang speel je AA: $r_Hoe_lang_speel_je_AA\n" .
"Je kent BBS via: $r_Je_kent_BBS_via\n" .
"Reden waarom je lid wilt worden: \n" .
"$r_Reden_waarom_je_lid_wilt_worden\n" .
"\n\n---------------- TRAININGEN ----------------\n\n" .
"Basic Combat Training: \n" .
"$m_Basic_Combat_Training[]\n" .
"Adv. Individual Training: \n" .
"$m_Adv__Individual_Training[]\n" .
"Adv. Marksmanship: \n" .
"$m_Adv__Marksmanship[]\n" .
"Airborne School: \n" .
"$m_Airborne_School[]\n" .
"Medic Training: \n" .
"$m_Medic_Training[]\n" .
"Special Forces Training: \n" .
"$m_Special_Forces_Training[]\n" .
"\n\n---------------- BBS REGELS ----------------\n\n" .
"Ik heb de BBS Regels gelezen en: $r_Ik_heb_de_BBS_Regels_gelezen_en\n" .
"\n\n---------------- OPMERKINGEN ----------------\n\n" .
"$Opmerkingen\n" .
"\n\n---------------------------------------------\n" ;
mail($mailto, $subject, $messageproper,
"From: \"$r_Naam\" <$re_E-mail>" . $headersep . "Reply-To: \"$r_Naam\" <$re_E-mail>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
header( "Location: $thankyouurl" );
exit ;
?>
// ------------- CONFIGURABLE SECTION ------------------------
// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "[email protected]" ;
$mailto = '[email protected]' ;
// $subject - set to the Subject line of the email, eg
//$subject = "E-mail from www.example.com" ;
$subject = "E-mail from www.example.com" ;
// the pages to be displayed, eg
//$formurl = "http://www.example.com/feedback.html" ;
//$errorurl = "http://www.example.com/error.html" ;
//$thankyouurl = "http://www.example.com/thankyou.html" ;
$formurl = "http://www.example.com/feedback.html" ;
$errorurl = "http://http://www.example.com/error.html" ;
$thankyouurl = "http://www.example.com/thankyou.html" ;
$uself = 0;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$r_Naam = $_POST['r_Naam'] ;
$r_Geboortedatum = $_POST['r_Geboortedatum'] ;
$r_Woonplaats = $_POST['r_Woonplaats'] ;
$re_E-mail = $_POST['re_E-mail'] ;
$MSN = $_POST['MSN'] ;
$Xfire = $_POST['Xfire'] ;
$r_AA_Username = $_POST['r_AA_Username'] ;
$r_Honor = $_POST['r_Honor'] ;
$r_ArmyOps_Tracker_account = $_POST['r_ArmyOps_Tracker_account'] ;
$r_Hoe_lang_speel_je_AA = $_POST['r_Hoe_lang_speel_je_AA'] ;
$r_Je_kent_BBS_via = $_POST['r_Je_kent_BBS_via'] ;
$r_Reden_waarom_je_lid_wilt_worden = $_POST['r_Reden_waarom_je_lid_wilt_worden'] ;
$m_Basic_Combat_Training[] = $_POST['m_Basic_Combat_Training[]'] ;
$m_Adv__Individual_Training[] = $_POST['m_Adv__Individual_Training[]'] ;
$m_Adv__Marksmanship[] = $_POST['m_Adv__Marksmanship[]'] ;
$m_Airborne_School[] = $_POST['m_Airborne_School[]'] ;
$m_Medic_Training[] = $_POST['m_Medic_Training[]'] ;
$m_Special_Forces_Training[] = $_POST['m_Special_Forces_Training[]'] ;
$r_Ik_heb_de_BBS_Regels_gelezen_en = $_POST['r_Ik_heb_de_BBS_Regels_gelezen_en'] ;
$Opmerkingen = $_POST['Opmerkingen'] ;
$http_referrer = getenv( "HTTP_REFERER" );
$messageproper =
"Dit bericht werd verzonden vanaf:\n" .
"$http_referrer\n" .
"\n\n----------- PERSOONLIJKE GEGEVENS -----------\n\n" .
"Naam: $r_Naam\n" .
"Geboortedatum: $r_Geboortedatum\n" .
"Woonplaats: $r_Woonplaats\n" .
"E-mail: $re_E-mail\n" .
"MSN: $MSN\n" .
"Xfire: $Xfire\n" .
"\n\n-------------- AMERICA'S ARMY --------------\n\n" .
"AA Username: $r_AA_Username\n" .
"Honor: $r_Honor\n" .
"ArmyOps Tracker account: $r_ArmyOps_Tracker_account\n" .
"Hoe lang speel je AA: $r_Hoe_lang_speel_je_AA\n" .
"Je kent BBS via: $r_Je_kent_BBS_via\n" .
"Reden waarom je lid wilt worden: \n" .
"$r_Reden_waarom_je_lid_wilt_worden\n" .
"\n\n---------------- TRAININGEN ----------------\n\n" .
"Basic Combat Training: \n" .
"$m_Basic_Combat_Training[]\n" .
"Adv. Individual Training: \n" .
"$m_Adv__Individual_Training[]\n" .
"Adv. Marksmanship: \n" .
"$m_Adv__Marksmanship[]\n" .
"Airborne School: \n" .
"$m_Airborne_School[]\n" .
"Medic Training: \n" .
"$m_Medic_Training[]\n" .
"Special Forces Training: \n" .
"$m_Special_Forces_Training[]\n" .
"\n\n---------------- BBS REGELS ----------------\n\n" .
"Ik heb de BBS Regels gelezen en: $r_Ik_heb_de_BBS_Regels_gelezen_en\n" .
"\n\n---------------- OPMERKINGEN ----------------\n\n" .
"$Opmerkingen\n" .
"\n\n---------------------------------------------\n" ;
mail($mailto, $subject, $messageproper,
"From: \"$r_Naam\" <$re_E-mail>" . $headersep . "Reply-To: \"$r_Naam\" <$re_E-mail>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
header( "Location: $thankyouurl" );
exit ;
?>
En action moet PRECIES verwijzen naar lidworden.php die jij op de server hebt staan.
Yep, de code is van lidworden.php
- Waarom maak je geen HTML mailtje met een table ofzow?
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
$adres_from = "";
$adres_to = "";
$onderwerp = "";
$bericht = "Dit is het <b>HTML</b> bericht.";
$boundary = uniqid("HTMLDEMO");
$headers = "From: ".$adres_from."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n";
$body = "--$boundary\r\n" .
"Content-Type: text/html; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
$body .= chunk_split(base64_encode($bericht));
mail($adres_from,$onderwerp,$body,$headers);
?>
$adres_from = "";
$adres_to = "";
$onderwerp = "";
$bericht = "Dit is het <b>HTML</b> bericht.";
$boundary = uniqid("HTMLDEMO");
$headers = "From: ".$adres_from."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n";
$body = "--$boundary\r\n" .
"Content-Type: text/html; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
$body .= chunk_split(base64_encode($bericht));
mail($adres_from,$onderwerp,$body,$headers);
?>
( code van wes )
En er komt niks in mijn mailbox :-(