Dear Reader,
I'm learning PHP (& SQL) besides my school. Have some books. And have some problems where I can't find a solution for in the books!
The problem is the IF-Statement it always matches! Here's the code:
if($antwoord = "1") {
echo "HTML CODE HERE"
}
if($antwoord = "2") {
echo "HTML CODE HERE"
}
if($antwoord = "3") {
echo "HTML CODE HERE"
}
if($antwoord = "4") {
echo "HTML CODE HERE"
}
ELSE {
echo "HTML CODE HERE"
}
So I thought maybe the variable $antwoord = empty but it isn't I added a line print ("$antwoord"); and it gave me 3. So I thought I had to get only the HTML Code I inserted at the IF-Statement for 3.. But I get all the HTML Code for all the for Statements!
Does anybody have a suggestions??
Greetings,
Kasper Schoonman (16yr)
The Netherlands