AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Communication Technology

The Add Term code

Week 14 · Unit 3 Creating Site Pages (7), Topic 3 Add_Term.php page: the short PHP code and what it lacks, the precise code with checks and messages, saving the record and checking the table · 3 lessons
Answers are for parents and teachers.
1
Write the PHP condition that is true only when $term, $trans and $defe are all non-empty after trim.
2
What do these give? (a) basename("pic/cat.webp") (b) empty("0") (c) $x ?? "none" when $x was never set
3
A term is “don’t stop”. Explain why gluing it into an INSERT breaks the command and how a prepared statement avoids this.
4
Give three reasons why the Add Term page needs the precise code and not only the short code.
5
After a save, which two things should you look at: the visitor’s message and what else?