Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // startup
- $result_final = "";
- $counter = 0;
- // Arrays bouwen
- $opmerking = $_POST['opmerkingen'];
- $datum = $_POST['datum'];
- $docent = $_POST['docent'];
- $vak = $_POST['vak'];
- $stroming = $_POST['stroming'];
- $lokaal = $_POST['lokaal'];
- $tijd = $_POST['tijd'];
- while ($counter <= count($datum))
- {
- if ($datum[$counter] == '')
- { echo 'Geen datum ingevoerd<br>';}
- elseif ($tijd[$counter] == '')
- { echo 'Geen tijd ingevoerd<br>';}
- else {
- $query = mysql_query( "INSERT INTO toetsrooster(`docent`, `vak`, `lokaal`, `datum`, `tijd`, `richting`, `opmerkingen`) VALUES('".addslashes($docent[$counter])."', '".addslashes($vak[$counter])."', '".addslashes($lokaal[$counter])."', '".addslashes($datum[$counter])."', '".addslashes($tijd[$counter])."', '".addslashes($stroming[$counter])."', '".addslashes($opmerking[$counter])."')" );
- $result_final .= "Toets ".($counter+1)." toegevoegd<br />";
- }
- $counter++;
- }
Advertisement
Add Comment
Please, Sign In to add comment