hulp nodig met mailformulier
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>join us</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="360" border="0" >
<tr>
<td width="155" align="left"><font color="#CCCCCC">Nickname:</font></td>
<td width="195" align="left"><FONT color=#ffffff><SMALL><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=30 value="-<|D'E'F|>-Pvt." name=nickname>
</FONT></SMALL></FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Naam:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=25 name=naam>
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Email-adres</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=30 name='Email'>
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Leeftijd:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=30 name=leeftijd>
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Gedoortedatum:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<SELECT
size=1 name=dag>
<OPTION value=1 selected>1</OPTION>
<OPTION
value=2>2</OPTION>
<OPTION value=3>3</OPTION>
<OPTION value=4>4</OPTION>
<OPTION value=5>5</OPTION>
<OPTION value=6>6</OPTION>
<OPTION
value=7>7</OPTION>
<OPTION value=8>8</OPTION>
<OPTION value=9>9</OPTION>
<OPTION value=10>10</OPTION>
<OPTION value=11>11</OPTION>
<OPTION
value=12>12</OPTION>
<OPTION value=13>13</OPTION>
<OPTION
value=14>14</OPTION>
<OPTION value=15>15</OPTION>
<OPTION
value=16>16</OPTION>
<OPTION value=17>17</OPTION>
<OPTION
value=18>18</OPTION>
<OPTION value=19>19</OPTION>
<OPTION
value=20>20</OPTION>
<OPTION value=21>21</OPTION>
<OPTION
value=22>22</OPTION>
<OPTION value=23>23</OPTION>
<OPTION
value=24>24</OPTION>
<OPTION value=25>25</OPTION>
<OPTION
value=26>26</OPTION>
<OPTION value=27>27</OPTION>
<OPTION
value=28>28</OPTION>
<OPTION value=29>29</OPTION>
<OPTION
value=30>30</OPTION>
<OPTION value=31>31</OPTION>
</SELECT>
<SELECT size=1
name=maand>
<OPTION value=Jan selected>Jan</OPTION>
<OPTION
value=Feb>Feb</OPTION>
<OPTION value=Mar>Mar</OPTION>
<OPTION
value=Apr>Apr</OPTION>
<OPTION value=May>May</OPTION>
<OPTION
value=Jun>Jun</OPTION>
<OPTION value=Jul>Jul</OPTION>
<OPTION
value=Aug>Aug</OPTION>
<OPTION value=Sep>Sep</OPTION>
<OPTION
value=Oct>Oct</OPTION>
<OPTION value=Nov>Nov</OPTION>
<OPTION
value=Dec>Dec</OPTION>
</SELECT>
<SELECT size=1 name=jaar>
<OPTION
value=1945 selected>1945</OPTION>
<OPTION value=1946>1946</OPTION>
<OPTION value=1947>1947</OPTION>
<OPTION value=1948>1948</OPTION>
<OPTION value=1949>1949</OPTION>
<OPTION value=1950>1950</OPTION>
<OPTION value=1951>1951</OPTION>
<OPTION value=1952>1952</OPTION>
<OPTION value=1953>1953</OPTION>
<OPTION value=1954>1954</OPTION>
<OPTION value=1955>1955</OPTION>
<OPTION value=1956>1956</OPTION>
<OPTION value=1957>1957</OPTION>
<OPTION value=1958>1958</OPTION>
<OPTION value=1959>1959</OPTION>
<OPTION value=1960>1960</OPTION>
<OPTION value=1961>1961</OPTION>
<OPTION value=1962>1962</OPTION>
<OPTION value=1963>1963</OPTION>
<OPTION value=1964>1964</OPTION>
<OPTION value=1965>1965</OPTION>
<OPTION value=1966>1966</OPTION>
<OPTION value=1967>1967</OPTION>
<OPTION value=1968>1968</OPTION>
<OPTION value=1969>1969</OPTION>
<OPTION value=1970>1970</OPTION>
<OPTION value=1971>1971</OPTION>
<OPTION value=1972>1972</OPTION>
<OPTION value=1973>1973</OPTION>
<OPTION value=1974>1974</OPTION>
<OPTION value=1975>1975</OPTION>
<OPTION value=1976>1976</OPTION>
<OPTION value=1977>1977</OPTION>
<OPTION value=1978>1978</OPTION>
<OPTION value=1979>1979</OPTION>
<OPTION value=1980>1980</OPTION>
<OPTION value=1981>1981</OPTION>
<OPTION value=1982>1982</OPTION>
<OPTION value=1983>1983</OPTION>
<OPTION value=1984>1984</OPTION>
<OPTION value=1985>1985</OPTION>
<OPTION value=1986>1986</OPTION>
<OPTION value=1987>1987</OPTION>
<OPTION value=1988>1988</OPTION>
<OPTION value=1989>1989</OPTION>
<OPTION value=1990>1990</OPTION>
<OPTION value=1991>1991</OPTION>
<OPTION value=1992>1992</OPTION>
<OPTION value=1993>1993 </OPTION>
<OPTION value=1994>1994</OPTION>
<OPTION value=1995>1995</OPTION>
<OPTION value=1996>1996</OPTION>
</SELECT>
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Land:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<SELECT
size=1 name=land>
<OPTION value="België"
selected>België</OPTION>
<OPTION value="niet gekozen"
selected>Kiezen...</OPTION>
<OPTION
value="Nederland">Nederland</OPTION>
</SELECT>
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Woonplaats:</font></td>
<td align="left"> </td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Conection type:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<SELECT
size=1 name=connection_type>
<OPTION value="<56k"
selected><56k</OPTION>
<OPTION value="niet gekozen"
selected>kiezen...</OPTION>
<OPTION value=56k>56k</OPTION>
<OPTION
value='Cable'>Cable</OPTION>
<OPTION value='ISDN'>ISDN</OPTION>
<OPTION
value=" ADSL"> ADSL</OPTION>
</SELECT>
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Favoriete Level:: </font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=30 name=favo_level>
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Favoriete Wapen: </font></td>
<td align="left"><font color=#ffffff><small><font face=Verdana>
<input
size=30 name=favo_wapen>
</font></small></font></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Van Waar Ken<br>
Je De Clan: </font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana><FONT color=#ffffff><SMALL><FONT face=Verdana>
<SELECT
size=1 name=van_waar_ken_je_de_clan>
<OPTION value="vriend"
selected>Vriend</OPTION>
<OPTION value="niet gekozen"
selected>kiezen...</OPTION>
<OPTION
value="andere site">Andere site</OPTION>
<OPTION
value="andere...">Andere...</OPTION>
</SELECT>
</FONT></SMALL></FONT></FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Heb Je Al In Een<br>
Andere Clan Gezeten:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT color=#ffffff><SMALL><FONT face=Verdana><FONT color=#ffffff><SMALL><FONT face=Verdana>
<SELECT
size=1 name=andere_clan_gezeten>
<OPTION value="ja"
selected>ja</OPTION>
<OPTION
value="nee">nee</OPTION>
</SELECT>
</FONT></SMALL></FONT></FONT></SMALL></FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Zo JA Welke: </font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=30 name=welke_clan>
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Waarom Wil<br>
Je Joinen:</font></td>
<td align="left"><font color=#ffffff><small><font face=Verdana>
<textarea name=waarom_joinen rows=3 cols=24></textarea>
</font></small></font><font color=#ffffff><small><font color=#ffffff><small><font face=Verdana> </font></small></font><font face=Verdana> </font></small></font></td>
</tr>
<tr>
<td align="left"><FONT face=Verdana color=#ffffff><STRONG><SMALL>
<INPUT type=submit value=verzenden name=B1>
</SMALL></STRONG></FONT></td>
<td align="left"><FONT face=Verdana color=#ffffff><STRONG><SMALL>
<INPUT type=reset value=Reset name=B2>
</SMALL></STRONG></FONT></td>
</tr>
</table>
</body>
</html>
maar kan iemand ervoor zorgen dat het als het ingevuld is naar mijn e-mailadres word gestuurd en ook als het is verzonden dat er dan een thanks pagina opkomt.
die thanks pagina zal ik wel maken.
alvast bedankt?,
DjDoPy
Je doet het volgende, je hebt in het formulier ieder veld een naam gegeven. Deze namen komen terug als je dit post.
Ten eerste moet je om je hele formulier <form action="mail.php" method="post"> en </form> zetten.
Daarna maak je de pagina mail.php met als inhoud
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
if(!isset($_POST)){
header("Location: bestand_waarna_ie_terug_gaat.htm");
}else{
// Nu komen hier alle formulierinhouden te staan
// dmv $_POST[ ]
// tussen de '[]' komt de naam van het formulierveld
// waar je de inhoud van wilt weten
// bijv:
$naam = $_POST['naam'];
$email = $_POST['email'];
// enzovoorts.
// daarna doe je dit:
$mail = mail("[email protected]", "onderwerp",
"Naam: $naam<br>
Email: $email <br>");
if($mail){
echo "mail is verzonden";
}
?>
if(!isset($_POST)){
header("Location: bestand_waarna_ie_terug_gaat.htm");
}else{
// Nu komen hier alle formulierinhouden te staan
// dmv $_POST[ ]
// tussen de '[]' komt de naam van het formulierveld
// waar je de inhoud van wilt weten
// bijv:
$naam = $_POST['naam'];
$email = $_POST['email'];
// enzovoorts.
// daarna doe je dit:
$mail = mail("[email protected]", "onderwerp",
"Naam: $naam<br>
Email: $email <br>");
if($mail){
echo "mail is verzonden";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>mailform</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
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
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
<?php
if(!isset($_POST)){
header("Location:thanks.htm");
}else{
$nickname = $_POST['nickname'];
$naam = $_POST['naam'];
$Email = $_POST['Email'];
$leeftijd = $_POST['leeftijd'];
$dag = $_POST['dag'];
$maand = $_POST['maand'];
$jaar = $_POST['jaar'];
$land = $_POST['land'];
$woonplaats = $_POST['woonplaats'];
$connection_type = $_POST['connection_type'];
$favo_level = $_POST['favo_level'];
$favo_wapen = $_POST['favo_wapen'];
$van_waar_ken_je_de_clan = $_POST['van_waar_ken_je_de_clan'];
$andere_clan_gezeten = $_POST['andere_clan_gezeten'];
$welke_clan = $_POST['welke_clan'];
$waarom_joinen = $_POST['waarom_joinen'];
// enzovoorts.
// daarna doe je dit:
$mail = mail("[email protected]", "onderwerp",
"Naam: $naam<br>
Email: $Email <br>");
if($mail){
echo "mail is verzonden";
}
?>
if(!isset($_POST)){
header("Location:thanks.htm");
}else{
$nickname = $_POST['nickname'];
$naam = $_POST['naam'];
$Email = $_POST['Email'];
$leeftijd = $_POST['leeftijd'];
$dag = $_POST['dag'];
$maand = $_POST['maand'];
$jaar = $_POST['jaar'];
$land = $_POST['land'];
$woonplaats = $_POST['woonplaats'];
$connection_type = $_POST['connection_type'];
$favo_level = $_POST['favo_level'];
$favo_wapen = $_POST['favo_wapen'];
$van_waar_ken_je_de_clan = $_POST['van_waar_ken_je_de_clan'];
$andere_clan_gezeten = $_POST['andere_clan_gezeten'];
$welke_clan = $_POST['welke_clan'];
$waarom_joinen = $_POST['waarom_joinen'];
// enzovoorts.
// daarna doe je dit:
$mail = mail("[email protected]", "onderwerp",
"Naam: $naam<br>
Email: $Email <br>");
if($mail){
echo "mail is verzonden";
}
?>
</body>
</html>
maar als je alles invult en drukt op verzenden dan ga je naar een witte blanko pagina en ik ontvang niks.
Je zegt dat je een blanco pagina krijgt.. wat als je van dit:
if($mail){
echo "mail is verzonden";
}
het volgende maakt:
if($mail){
echo "mail is verzonden";
}else{
echo"mail is niet verzonden";
}
deze pagina's heb ik gemaakt.
join us.htm:
<form method="post" action="mailform.php">
<p>
</p>
<br><table width="360" border="0" >
<tr>
<td width="155" align="left"><font color="#CCCCCC">Nickname:</font></td>
<td width="195" align="left"><FONT color=#ffffff><SMALL><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=30 value="-<|D'E'F|>-Pvt." name="nickname">
</FONT></SMALL></FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Naam:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=25 name="naam">
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Email-adres</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=30 name="Email">
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Leeftijd:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=30 name="leeftijd">
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Gedoortedatum:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<SELECT
size=1 name="dag">
<OPTION value=1 selected>1</OPTION>
<OPTION
value=2>2</OPTION>
<OPTION value=3>3</OPTION>
<OPTION value=4>4</OPTION>
<OPTION value=5>5</OPTION>
<OPTION value=6>6</OPTION>
<OPTION
value=7>7</OPTION>
<OPTION value=8>8</OPTION>
<OPTION value=9>9</OPTION>
<OPTION value=10>10</OPTION>
<OPTION value=11>11</OPTION>
<OPTION
value=12>12</OPTION>
<OPTION value=13>13</OPTION>
<OPTION
value=14>14</OPTION>
<OPTION value=15>15</OPTION>
<OPTION
value=16>16</OPTION>
<OPTION value=17>17</OPTION>
<OPTION
value=18>18</OPTION>
<OPTION value=19>19</OPTION>
<OPTION
value=20>20</OPTION>
<OPTION value=21>21</OPTION>
<OPTION
value=22>22</OPTION>
<OPTION value=23>23</OPTION>
<OPTION
value=24>24</OPTION>
<OPTION value=25>25</OPTION>
<OPTION
value=26>26</OPTION>
<OPTION value=27>27</OPTION>
<OPTION
value=28>28</OPTION>
<OPTION value=29>29</OPTION>
<OPTION
value=30>30</OPTION>
<OPTION value=31>31</OPTION>
</SELECT>
<SELECT size=1
name="maand">
<OPTION value=Jan selected>Jan</OPTION>
<OPTION
value=Feb>Feb</OPTION>
<OPTION value=Mar>Mar</OPTION>
<OPTION
value=Apr>Apr</OPTION>
<OPTION value=May>May</OPTION>
<OPTION
value=Jun>Jun</OPTION>
<OPTION value=Jul>Jul</OPTION>
<OPTION
value=Aug>Aug</OPTION>
<OPTION value=Sep>Sep</OPTION>
<OPTION
value=Oct>Oct</OPTION>
<OPTION value=Nov>Nov</OPTION>
<OPTION
value=Dec>Dec</OPTION>
</SELECT>
<SELECT size=1 name="jaar">
<OPTION
value=1945 selected>1945</OPTION>
<OPTION value=1946>1946</OPTION>
<OPTION value=1947>1947</OPTION>
<OPTION value=1948>1948</OPTION>
<OPTION value=1949>1949</OPTION>
<OPTION value=1950>1950</OPTION>
<OPTION value=1951>1951</OPTION>
<OPTION value=1952>1952</OPTION>
<OPTION value=1953>1953</OPTION>
<OPTION value=1954>1954</OPTION>
<OPTION value=1955>1955</OPTION>
<OPTION value=1956>1956</OPTION>
<OPTION value=1957>1957</OPTION>
<OPTION value=1958>1958</OPTION>
<OPTION value=1959>1959</OPTION>
<OPTION value=1960>1960</OPTION>
<OPTION value=1961>1961</OPTION>
<OPTION value=1962>1962</OPTION>
<OPTION value=1963>1963</OPTION>
<OPTION value=1964>1964</OPTION>
<OPTION value=1965>1965</OPTION>
<OPTION value=1966>1966</OPTION>
<OPTION value=1967>1967</OPTION>
<OPTION value=1968>1968</OPTION>
<OPTION value=1969>1969</OPTION>
<OPTION value=1970>1970</OPTION>
<OPTION value=1971>1971</OPTION>
<OPTION value=1972>1972</OPTION>
<OPTION value=1973>1973</OPTION>
<OPTION value=1974>1974</OPTION>
<OPTION value=1975>1975</OPTION>
<OPTION value=1976>1976</OPTION>
<OPTION value=1977>1977</OPTION>
<OPTION value=1978>1978</OPTION>
<OPTION value=1979>1979</OPTION>
<OPTION value=1980>1980</OPTION>
<OPTION value=1981>1981</OPTION>
<OPTION value=1982>1982</OPTION>
<OPTION value=1983>1983</OPTION>
<OPTION value=1984>1984</OPTION>
<OPTION value=1985>1985</OPTION>
<OPTION value=1986>1986</OPTION>
<OPTION value=1987>1987</OPTION>
<OPTION value=1988>1988</OPTION>
<OPTION value=1989>1989</OPTION>
<OPTION value=1990>1990</OPTION>
<OPTION value=1991>1991</OPTION>
<OPTION value=1992>1992</OPTION>
<OPTION value=1993>1993 </OPTION>
<OPTION value=1994>1994</OPTION>
<OPTION value=1995>1995</OPTION>
<OPTION value=1996>1996</OPTION>
</SELECT>
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Land:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<SELECT
size=1 name="land">
<OPTION value="België"
selected>België</OPTION>
<OPTION value="niet gekozen"
selected>Kiezen...</OPTION>
<OPTION
value="Nederland">Nederland</OPTION>
</SELECT>
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Woonplaats:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=30 name="woonplaats">
</FONT></SMALL></FONT> </td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Conection type:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<SELECT
size=1 name="connection_type">
<OPTION value="<56k"
selected><56k</OPTION>
<OPTION value="niet gekozen"
selected>kiezen...</OPTION>
<OPTION value=56k>56k</OPTION>
<OPTION
value='Cable'>Cable</OPTION>
<OPTION value='ISDN'>ISDN</OPTION>
<OPTION
value=" ADSL"> ADSL</OPTION>
</SELECT>
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Favoriete Level:: </font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=30 name="favo_level">
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Favoriete Wapen: </font></td>
<td align="left"><font color=#ffffff><small><font face=Verdana>
<input
size=30 name="favo_wapen">
</font></small></font></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Van Waar Ken<br>
Je De Clan: </font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana><FONT color=#ffffff><SMALL><FONT face=Verdana>
<SELECT
size=1 name="van_waar_ken_je_de_clan">
<OPTION value="vriend"
selected>Vriend</OPTION>
<OPTION value="niet gekozen"
selected>kiezen...</OPTION>
<OPTION
value="andere site">Andere site</OPTION>
<OPTION
value="andere...">Andere...</OPTION>
</SELECT>
</FONT></SMALL></FONT></FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Heb Je Al In Een<br>
Andere Clan Gezeten:</font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT color=#ffffff><SMALL><FONT face=Verdana><FONT color=#ffffff><SMALL><FONT face=Verdana>
<SELECT
size=1 name="andere_clan_gezeten">
<OPTION value="ja"
selected>ja</OPTION>
<OPTION
value="nee">nee</OPTION>
</SELECT>
</FONT></SMALL></FONT></FONT></SMALL></FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Zo JA Welke: </font></td>
<td align="left"><FONT color=#ffffff><SMALL><FONT face=Verdana>
<INPUT
size=30 name="welke_clan">
</FONT></SMALL></FONT></td>
</tr>
<tr>
<td align="left"><font color="#CCCCCC">Waarom Wil<br>
Je Joinen:</font></td>
<td align="left"><font color=#ffffff><small><font face=Verdana>
<textarea name="waarom_joinen" rows=3 cols=24></textarea>
</font></small></font><font color=#ffffff><small><font color=#ffffff><small><font face=Verdana> </font></small></font><font face=Verdana> </font></small></font></td>
</tr>
<tr>
<td align="left"><FONT face=Verdana color=#ffffff><STRONG><SMALL>
<INPUT type=submit value=verzenden name=B1>
</SMALL></STRONG></FONT></td>
<td align="left"><FONT face=Verdana color=#ffffff><STRONG><SMALL>
<INPUT type=reset value=Reset name=B2>
</SMALL></STRONG></FONT></td>
</tr>
</table>
</FORM>
mailform.php:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>mailform</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
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
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
<?php
if(!isset($_POST)){
header("Location:thanks.htm");
}else{
$nickname = $_POST['nickname'];
$naam = $_POST['naam'];
$Email = $_POST['Email'];
$leeftijd = $_POST['leeftijd'];
$dag = $_POST['dag'];
$maand = $_POST['maand'];
$jaar = $_POST['jaar'];
$land = $_POST['land'];
$woonplaats = $_POST['woonplaats'];
$connection_type = $_POST['connection_type'];
$favo_level = $_POST['favo_level'];
$favo_wapen = $_POST['favo_wapen'];
$van_waar_ken_je_de_clan = $_POST['van_waar_ken_je_de_clan'];
$andere_clan_gezeten = $_POST['andere_clan_gezeten'];
$welke_clan = $_POST['welke_clan'];
$waarom_joinen = $_POST['waarom_joinen'];
// enzovoorts.
// daarna doe je dit:
$mail = mail("[email protected]", "onderwerp",
"Naam: $naam<br>
Email: $Email <br>");
if($mail){
echo "mail is verzonden";
}else{
echo"mail is niet verzonden";
}
?>
if(!isset($_POST)){
header("Location:thanks.htm");
}else{
$nickname = $_POST['nickname'];
$naam = $_POST['naam'];
$Email = $_POST['Email'];
$leeftijd = $_POST['leeftijd'];
$dag = $_POST['dag'];
$maand = $_POST['maand'];
$jaar = $_POST['jaar'];
$land = $_POST['land'];
$woonplaats = $_POST['woonplaats'];
$connection_type = $_POST['connection_type'];
$favo_level = $_POST['favo_level'];
$favo_wapen = $_POST['favo_wapen'];
$van_waar_ken_je_de_clan = $_POST['van_waar_ken_je_de_clan'];
$andere_clan_gezeten = $_POST['andere_clan_gezeten'];
$welke_clan = $_POST['welke_clan'];
$waarom_joinen = $_POST['waarom_joinen'];
// enzovoorts.
// daarna doe je dit:
$mail = mail("[email protected]", "onderwerp",
"Naam: $naam<br>
Email: $Email <br>");
if($mail){
echo "mail is verzonden";
}else{
echo"mail is niet verzonden";
}
?>
</body>
</html>
kan iemand mij vertellen wat ik verkeerd doe?
Dit is wat ik er van gemaakt heb:
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
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
<?php
if(!isset($HTTP_POST_VARS)){
header("Location: verzonden.html");
}else{
// Nu komen hier alle formulierinhouden te staan
// dmv $_POST[ ]
// tussen de '[]' komt de naam van het formulierveld
// waar je de inhoud van wilt weten
// bijv:
$bedrijf = $HTTP_POST_VARS['bedrijf'];
$naam = $HTTP_POST_VARS['naam'];
$straat = $HTTP_POST_VARS['straat'];
$postcode = $HTTP_POST_VARS['postcode'];
$telefoon = $HTTP_POST_VARS['telefoon'];
$email = $HTTP_POST_VARS['email'];
$bericht = $HTTP_POST_VARS['bericht'];
// enzovoorts.
// daarna doe je dit:
$mail = mail("[email protected]", "bericht via de site",
"Bedrijf: $bedrijf \n
Naam: $naam \n
Straat: $straat \n
Postcode: $postcode \n
Telefoon: $telefoon \n
Email: $email \n
bericht: $bericht \n");
if($mail){
echo "mail is verzonden";
} else {
echo"mail is niet verzonden";
}
?>
if(!isset($HTTP_POST_VARS)){
header("Location: verzonden.html");
}else{
// Nu komen hier alle formulierinhouden te staan
// dmv $_POST[ ]
// tussen de '[]' komt de naam van het formulierveld
// waar je de inhoud van wilt weten
// bijv:
$bedrijf = $HTTP_POST_VARS['bedrijf'];
$naam = $HTTP_POST_VARS['naam'];
$straat = $HTTP_POST_VARS['straat'];
$postcode = $HTTP_POST_VARS['postcode'];
$telefoon = $HTTP_POST_VARS['telefoon'];
$email = $HTTP_POST_VARS['email'];
$bericht = $HTTP_POST_VARS['bericht'];
// enzovoorts.
// daarna doe je dit:
$mail = mail("[email protected]", "bericht via de site",
"Bedrijf: $bedrijf \n
Naam: $naam \n
Straat: $straat \n
Postcode: $postcode \n
Telefoon: $telefoon \n
Email: $email \n
bericht: $bericht \n");
if($mail){
echo "mail is verzonden";
} else {
echo"mail is niet verzonden";
}
?>
in mijn html formulier staat het volgende:
<form method="post" action="mail.php">
Ik hoop dat iemand een oplossing heeft.