select onchange="sendData(this)"
ik ben bezig om via een form een change door te voeren.
echter loop ik er een beetje op vast.
Dit is mijn form
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
<form method="post" action="">
<td>
<select id="selectBox" onchange="sendData(this);">
<option value="0"></option>
<option value="1" style="background-color: #ff0000"></option>
<option value="2" style="background-color: #3000ff"></option>
<option value="3" style="background-color: #36ff00"></option>
<option value="4" style="background-color: #e400ff"></option>
<option value="5" style="background-color: #fff000"></option>
</select>
</td>
<input type="hidden" name="id" value="'.$res['id'].'" />
</form>
<td>
<select id="selectBox" onchange="sendData(this);">
<option value="0"></option>
<option value="1" style="background-color: #ff0000"></option>
<option value="2" style="background-color: #3000ff"></option>
<option value="3" style="background-color: #36ff00"></option>
<option value="4" style="background-color: #e400ff"></option>
<option value="5" style="background-color: #fff000"></option>
</select>
</td>
<input type="hidden" name="id" value="'.$res['id'].'" />
</form>
als ik de kleur verander dan geeft var_dump post aan
array(1) { ["id"]=> string(1) "1" }
dit klopt omdat ik de eerste doe.
echter neemt hij de hidden input niet mee en dit is wel nodig.
Hoe kan ik het maken zodat ook de hidden id mee wordt gestuurd?
Thomas de vries op 31/07/2017 10:11:57:
als ik de kleur verander dan geeft var_dump post aan
array(1) { ["id"]=> string(1) "1" }
echter neemt hij de hidden input niet mee en dit is wel nodig.
array(1) { ["id"]=> string(1) "1" }
echter neemt hij de hidden input niet mee en dit is wel nodig.
Dat is de hidden input.
Geef je select een name="...".
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
<form method="post" action="" id="myform">
<td>
<select id="selectBox" name="color" onchange="sendData(this);">
<option value="0"></option>
<option value="1" style="background-color: #ff0000"></option>
<option value="2" style="background-color: #3000ff"></option>
<option value="3" style="background-color: #36ff00"></option>
<option value="4" style="background-color: #e400ff"></option>
<option value="5" style="background-color: #fff000"></option>
</select>
</td>
<input type="hidden" name="id" value="'.$res['id'].'" />
</form>
<td>
<select id="selectBox" name="color" onchange="sendData(this);">
<option value="0"></option>
<option value="1" style="background-color: #ff0000"></option>
<option value="2" style="background-color: #3000ff"></option>
<option value="3" style="background-color: #36ff00"></option>
<option value="4" style="background-color: #e400ff"></option>
<option value="5" style="background-color: #fff000"></option>
</select>
</td>
<input type="hidden" name="id" value="'.$res['id'].'" />
</form>
JQuery
Code (php)
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
function sendData(id) {
var value = id.value;
$('#output').html('<img src="LoaderIcon.gif" />');
jQuery.ajax({
url: "ajax.php",
data:'id='+value,
type: "POST",
success:function(data){$('#container').html(data);}
});
}
var value = id.value;
$('#output').html('<img src="LoaderIcon.gif" />');
jQuery.ajax({
url: "ajax.php",
data:'id='+value,
type: "POST",
success:function(data){$('#container').html(data);}
});
}
Ouput is nog steeds
array(1) { ["id"]=> string(1) "1" }
en dat is niet van de hidden input. Omdat de hidden input een id heeft van 546
Gewijzigd op 31/07/2017 11:12:20 door thomas de vries
Maar waarom wil je dan 2 velden met de naam id hebben? Dat is vragen om problemen.
- geen of dubbele name attributen
- formuliervelden die niet tussen <form> en </form> geplaatst zijn
- formulieren met een disabled attribuut worden niet gepost
- formulieren mogen niet in elkaar genesteld zijn (<form> ... <form> ... </form> ... </form>)
Toevoeging op 31/07/2017 12:18:35:
oh wait...
SendData(this) ... this lijkt mij naar je select te verwijzen. wellicht is dat de reden. Laat die functie SendData eens zien?
Gewijzigd op 31/07/2017 12:15:39 door Frank Nietbelangrijk
hier is de functie
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function sendData() {
var data = $("#myform").serialize();
// debug regeltje
console.log(data);
$('#output').html('<img src="LoaderIcon.gif" />');
jQuery.ajax({
url: "ajax.php",
data: data,
type: "POST",
success:function(data){$('#container').html(data);}
});
}
var data = $("#myform").serialize();
// debug regeltje
console.log(data);
$('#output').html('<img src="LoaderIcon.gif" />');
jQuery.ajax({
url: "ajax.php",
data: data,
type: "POST",
success:function(data){$('#container').html(data);}
});
}
Toevoeging op 31/07/2017 12:28:11:
this is niet meer nodig bij het aanroepen van je functie
Bijna klaar. Het werkt namelijk nog niet 100%
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
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
while($res = $query->fetch_assoc())
{
if($res['train_set'] == 1) {
$set = 'Set';
} else {
$set = '';
}
switch($res['train_type'])
{
case 0: $type = ''; break;
case 1: $type = 'S'; break;
case 2: $type = 'D'; break;
case 3: $type = 'E'; break;
case 4: $type = 'M'; break;
}
switch($res['train_use'])
{
case 1: $selected = '<option value="1" selected>'.$res['train_use'].'</option><option value="0">0</option>'; break;
case 0: $selected = '<option value="0" selected>'.$res['train_use'].'</option><option value="1">1</option>'; break;
}
echo '
<tr>
<form method="post" action="" id="myform">
<td>
<select class="test" name="color" onchange="sendData();">
<option value="0"></option>
<option value="1" style="background-color: #ff0000"></option>
<option value="2" style="background-color: #3000ff"></option>
<option value="3" style="background-color: #36ff00"></option>
<option value="4" style="background-color: #e400ff"></option>
<option value="5" style="background-color: #fff000"></option>
</select>
</td>
<input type="hidden" name="id" value="'.$res['id'].'" />
{
if($res['train_set'] == 1) {
$set = 'Set';
} else {
$set = '';
}
switch($res['train_type'])
{
case 0: $type = ''; break;
case 1: $type = 'S'; break;
case 2: $type = 'D'; break;
case 3: $type = 'E'; break;
case 4: $type = 'M'; break;
}
switch($res['train_use'])
{
case 1: $selected = '<option value="1" selected>'.$res['train_use'].'</option><option value="0">0</option>'; break;
case 0: $selected = '<option value="0" selected>'.$res['train_use'].'</option><option value="1">1</option>'; break;
}
echo '
<tr>
<form method="post" action="" id="myform">
<td>
<select class="test" name="color" onchange="sendData();">
<option value="0"></option>
<option value="1" style="background-color: #ff0000"></option>
<option value="2" style="background-color: #3000ff"></option>
<option value="3" style="background-color: #36ff00"></option>
<option value="4" style="background-color: #e400ff"></option>
<option value="5" style="background-color: #fff000"></option>
</select>
</td>
<input type="hidden" name="id" value="'.$res['id'].'" />
Zoals je kunt zien zit het hidden field ook in de while loop.
echter maakt het niet uit welke row ik selecteer hij geeft altijd maar 1 id weer.
Dus de output
is nu dit
Als ik de eerste row pak met de eerste kleur dan heb ik als output
array(2) { ["color"]=> string(1) "1" ["id"]=> string(3) "348" }
Pak ik de 2de row met de eerste kleur dan heb ik als output
array(2) { ["color"]=> string(1) "0" ["id"]=> string(3) "348" }
dus hij verandert de kleur niet en ook de juiste id geeft die niet mee.
Of miet ik de function ook in de while loop zetten?
Je zult dus het id van de <form> in je lus telkens moeten wijzigen. Dit kan bijvoorbeeld als volgt:
Vervolgens krijg je dan nog het probleem dat je functie SendData wel moet weten welk formulier hij moet posten..
hiervoor zou je $i mee kunnen geven als parameter
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
en je functie wordt dan iets als:
function sendData(nr) {
var data = $("#myform" + nr).serialize();
// debug regeltje
console.log(data);
$('#output').html('<img src="LoaderIcon.gif" />');
jQuery.ajax({
url: "ajax.php",
data: data,
type: "POST",
success:function(data){$('#container').html(data);}
});
}
function sendData(nr) {
var data = $("#myform" + nr).serialize();
// debug regeltje
console.log(data);
$('#output').html('<img src="LoaderIcon.gif" />');
jQuery.ajax({
url: "ajax.php",
data: data,
type: "POST",
success:function(data){$('#container').html(data);}
});
}
Gewijzigd op 31/07/2017 13:00:37 door Frank Nietbelangrijk
Het werkt nu zoals ik het in gedachten heb.
Nu kan ik er mee verder.
Ook je tips heb ik wat aan gehad.
Ik heb dit op codepen even uitgewerkt: https://codepen.io/anon/pen/VzaLVa
Verder vraag ik me af of het niet handiger is als je dit doet:
Je krijgt dan direct de kleurcode terug met $_POST maar misschien wil je dit juist niet en dan moet je je hier maar niets van aantrekken ;-)
Gewijzigd op 31/07/2017 13:50:48 door Frank Nietbelangrijk
Ik ben al aardig op de goede richting heb in iedergeval een x aantal dingen aangepast.
Nu is het volgende.
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function sendData(nr) {
var data = $("#myform"+ nr).serialize();
// debug regeltje
console.log(data);
//$('#output').html('<img src="LoaderIcon.gif" />');
jQuery.ajax({
url: "/inc/update.php",
data: data,
type: "POST",
success:function(data)
{
if(data) {
$("#container").load(window.location + " #container");
} else {
$("#container").load(window.location + " #container");
}
}
});
}
var data = $("#myform"+ nr).serialize();
// debug regeltje
console.log(data);
//$('#output').html('<img src="LoaderIcon.gif" />');
jQuery.ajax({
url: "/inc/update.php",
data: data,
type: "POST",
success:function(data)
{
if(data) {
$("#container").load(window.location + " #container");
} else {
$("#container").load(window.location + " #container");
}
}
});
}
Na dat de div gerefreshed is werkt de code niet meer dan dien ik de pagina te herladen voordat ik weer wat kan doen.
Hoe kan ik dit oplossen?
krijg je foutmeldingen in je console?
Als ik het aanpas met een alert dan krijg ik Array{} te zien.
Update.php
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
session_start();
include("config.php");
include("function.php");
include("class.User.php");
$Func = new Func($db);
if(isset($_SESSION['userData'])) {
$User = new GUser($db,$Func, $_SESSION['userData']['oauth_uid']);
}
//echo var_dump($_POST);
if(isset($_POST['color'])) {
$query = $db->query('UPDATE user_fleet SET train_row_color = "'.$db->real_escape_string($_POST['color']).'" WHERE id = "'.$db->real_escape_string($_POST['id']).'"');
}
include("config.php");
include("function.php");
include("class.User.php");
$Func = new Func($db);
if(isset($_SESSION['userData'])) {
$User = new GUser($db,$Func, $_SESSION['userData']['oauth_uid']);
}
//echo var_dump($_POST);
if(isset($_POST['color'])) {
$query = $db->query('UPDATE user_fleet SET train_row_color = "'.$db->real_escape_string($_POST['color']).'" WHERE id = "'.$db->real_escape_string($_POST['id']).'"');
}
Toevoeging op 01/08/2017 11:57:19:
Hmm als ik een aparte pagina maak
met dit
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//session_start();
include("inc/config.php");
include("inc/function.php");
include("inc/ubb.php");
include("inc/class.User.php");
$Func = new Func($db);
//if(isset($_SESSION['userData'])) {
$User = new GUser($db,$Func, '100886610003250557837');
//}
include_once('inc/lang.php');
$gold_swap_id = "1";
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Trainstation Swap League</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/css/style.css" type="text/css" />
<link rel="stylesheet" href="/css/style_news.css" type="text/css" />
<!--[if IE 6]><link rel="stylesheet" href="/css/ie6-style.css" type="text/css" media="all" /><![endif]-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://malsup.github.com/jquery.form.js"></script>
<script>
$( document ).ready(function() {
// onchange op alle formulieren met class="myform"
$( ".myform" ).change(function() {
// verkrijg de <form> element dat bij dit select hoort en serialize form data
var data = $(this).closest("form").serialize();
// debug regeltje
console.log(data);
$('#output').html('<img src="LoaderIcon.gif" />');
jQuery.ajax({
url: "inc/update.php",
data: data,
type: "POST",
success:function(data){$('#container').html(data);}
});
});
});
</script>
</head>
<body>
<form method="post" action="" class="myform"> <!-- VERANDER ID IN CLASS -->
<td>
<select class="test" name="color">
<option value="0"></option>
<option value="ff0000" style="background-color: #ff0000"></option>
<option value="3000ff" style="background-color: #3000ff"></option>
<option value="36ff00" style="background-color: #36ff00"></option>
<option value="e400ff" style="background-color: #e400ff"></option>
<option value="fff000" style="background-color: #fff000"></option>
</select>
</td>
<input type="hidden" name="id" value="348" />
</form>
</body>
</html>
include("inc/config.php");
include("inc/function.php");
include("inc/ubb.php");
include("inc/class.User.php");
$Func = new Func($db);
//if(isset($_SESSION['userData'])) {
$User = new GUser($db,$Func, '100886610003250557837');
//}
include_once('inc/lang.php');
$gold_swap_id = "1";
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Trainstation Swap League</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/css/style.css" type="text/css" />
<link rel="stylesheet" href="/css/style_news.css" type="text/css" />
<!--[if IE 6]><link rel="stylesheet" href="/css/ie6-style.css" type="text/css" media="all" /><![endif]-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://malsup.github.com/jquery.form.js"></script>
<script>
$( document ).ready(function() {
// onchange op alle formulieren met class="myform"
$( ".myform" ).change(function() {
// verkrijg de <form> element dat bij dit select hoort en serialize form data
var data = $(this).closest("form").serialize();
// debug regeltje
console.log(data);
$('#output').html('<img src="LoaderIcon.gif" />');
jQuery.ajax({
url: "inc/update.php",
data: data,
type: "POST",
success:function(data){$('#container').html(data);}
});
});
});
</script>
</head>
<body>
<form method="post" action="" class="myform"> <!-- VERANDER ID IN CLASS -->
<td>
<select class="test" name="color">
<option value="0"></option>
<option value="ff0000" style="background-color: #ff0000"></option>
<option value="3000ff" style="background-color: #3000ff"></option>
<option value="36ff00" style="background-color: #36ff00"></option>
<option value="e400ff" style="background-color: #e400ff"></option>
<option value="fff000" style="background-color: #fff000"></option>
</select>
</td>
<input type="hidden" name="id" value="348" />
</form>
</body>
</html>
Dan werkt het wel.
Maar als die pagina geinclude word dan werkt het niet.
Include gebeurt 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
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
if(isset($_SESSION['userData']))
{
if($User->HasAccess() == FALSE && $_GET['p'] != "logout")
{
echo '<div class="block">
<div class="block-bot">
<div class="head">
<div class="head-cnt">
<h3>Swap League</h3>
<div class="cl"> </div>
</div>
</div>
<div class="row-articles articles">
<div class="cl"> </div>
<center><font size="6">To enter this site you need to ask permission</font></center>
</div>
</div>
</div>';
}
else
{
if(isset($_GET['p']) == "" || $_GET['p'] == "home" || $_GET['p'] == "1")
{
if(!file_exists("./pages/home.php"))
{
include("./pages/404.php");
}
else
{
include("./pages/home.php");
}
}
else
{
$file = './pages/' . $_GET['p'] . '.php';
if(!file_exists($file))
{
$file = './pages/404.php';
}
include($file);
}
}
}
else
{
echo '<div class="block">
<div class="block-bot">
<div class="head">
<div class="head-cnt">
<h3>SwapLeague</h3>
<div class="cl"> </div>
</div>
</div>
<div class="row-articles articles">
<div class="cl"> </div>
<center><font size="6">To enter this site you need to login or you need to ask permission</font></center>
</div>
</div>
</div>';
}
?>
{
if($User->HasAccess() == FALSE && $_GET['p'] != "logout")
{
echo '<div class="block">
<div class="block-bot">
<div class="head">
<div class="head-cnt">
<h3>Swap League</h3>
<div class="cl"> </div>
</div>
</div>
<div class="row-articles articles">
<div class="cl"> </div>
<center><font size="6">To enter this site you need to ask permission</font></center>
</div>
</div>
</div>';
}
else
{
if(isset($_GET['p']) == "" || $_GET['p'] == "home" || $_GET['p'] == "1")
{
if(!file_exists("./pages/home.php"))
{
include("./pages/404.php");
}
else
{
include("./pages/home.php");
}
}
else
{
$file = './pages/' . $_GET['p'] . '.php';
if(!file_exists($file))
{
$file = './pages/404.php';
}
include($file);
}
}
}
else
{
echo '<div class="block">
<div class="block-bot">
<div class="head">
<div class="head-cnt">
<h3>SwapLeague</h3>
<div class="cl"> </div>
</div>
</div>
<div class="row-articles articles">
<div class="cl"> </div>
<center><font size="6">To enter this site you need to login or you need to ask permission</font></center>
</div>
</div>
</div>';
}
?>
.htaccess
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
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
RewriteEngine On
RewriteBase /
# Bestaande bestanden of mappen uitsluiten
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule ^(.*?)$ $1 [L]
# Alles naar n parameter
RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)$ index.php?p=$1&a=$2&r=$3&t=$4&s=$5&q=$6&z=$7 [NC,L]
RewriteRule ^(.*)/(.*)/(.*)/(.*)$ index.php?p=$1&a=$2&r=$3&t=$4&s=$5&q=$6 [NC,L]
RewriteRule ^(.*)/(.*)/(.*)/(.*)$ index.php?p=$1&a=$2&r=$3&t=$4&s=$5 [NC,L]
RewriteRule ^(.*)/(.*)/(.*)/(.*)$ index.php?p=$1&a=$2&r=$3&t=$4 [NC,L]
RewriteRule ^(.*)/(.*)/(.*)$ index.php?p=$1&a=$2&r=$3 [NC,L]
RewriteRule ^(.*)/(.*)$ index.php?p=$1&a=$2 [NC,L]
RewriteRule ^(.*?)$ index.php?p=$1 [QSA,L]
RewriteBase /
# Bestaande bestanden of mappen uitsluiten
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule ^(.*?)$ $1 [L]
# Alles naar n parameter
RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)$ index.php?p=$1&a=$2&r=$3&t=$4&s=$5&q=$6&z=$7 [NC,L]
RewriteRule ^(.*)/(.*)/(.*)/(.*)$ index.php?p=$1&a=$2&r=$3&t=$4&s=$5&q=$6 [NC,L]
RewriteRule ^(.*)/(.*)/(.*)/(.*)$ index.php?p=$1&a=$2&r=$3&t=$4&s=$5 [NC,L]
RewriteRule ^(.*)/(.*)/(.*)/(.*)$ index.php?p=$1&a=$2&r=$3&t=$4 [NC,L]
RewriteRule ^(.*)/(.*)/(.*)$ index.php?p=$1&a=$2&r=$3 [NC,L]
RewriteRule ^(.*)/(.*)$ index.php?p=$1&a=$2 [NC,L]
RewriteRule ^(.*?)$ index.php?p=$1 [QSA,L]
SEO
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//SEO SCRIPT//
if(!empty($_GET) && isset($_GET['p'])) {
$aParameters = explode("/", $_GET['p']);
$iTeller = 0;
foreach($aParameters as $sParameter) {
if(preg_match("_=_", $sParameter)) {
list($key, $value) = explode("=", $sParameter);
$_GET[$key] = $value;
} else {
if($iTeller > 0) {
$_GET['param'.$iTeller] = $sParameter;
} else {
$_GET['p'] = $sParameter;
}
$iTeller++;
}
}
}
if(!empty($_GET) && isset($_GET['p'])) {
$aParameters = explode("/", $_GET['p']);
$iTeller = 0;
foreach($aParameters as $sParameter) {
if(preg_match("_=_", $sParameter)) {
list($key, $value) = explode("=", $sParameter);
$_GET[$key] = $value;
} else {
if($iTeller > 0) {
$_GET['param'.$iTeller] = $sParameter;
} else {
$_GET['p'] = $sParameter;
}
$iTeller++;
}
}
}
Gewijzigd op 01/08/2017 11:59:40 door thomas de vries
Html form was niet in de juiste contex waardoor die het niet deed met de rest van de code.