i'm having trouble with a very unexpected parse error in a php file (opstelling.php)
i'm sending information from a html form (generated in php) tot a page, which should
process the info and send it into a mysql database
i have some experience in php html and mysql but not a lot.
the problem is the parse error isn't generated within this php file (i think)
but somewhere in my php code that's processed before this.
somehow this generates an error:
(showing the entire opstelling.php every time)
Parse error: parse error, expecting `';'' in C:\xampp\htdocs\include\opstelling.php on line 7
file:
<?php
$wedstrijd=$_POST['wedstrijd'];
$thuisfactor=$_POST['thuisfactor'];
if ($thuisfactor==1){
for (k=1;k<=3;k++){
echo ($wedstrijd);
}
}
?>
but this doesn't:
<?php
$wedstrijd=$_POST['wedstrijd'];
$thuisfactor=$_POST['thuisfactor'];
if ($thuisfactor==1){
echo ($wedstrijd);
}
?>
(this generates '1', because both variables are 1)
my best guess is somewhere in the preceding php code i forgot to close a statement (forgot the 😉
or i forgot a } after a for or while loop
Does anybody know or have a decent guess of what i did wrong??
thanks in advance!!