Skip to content

Commit cc293e7

Browse files
committed
Add display of number of invalud inputs entered
1 parent 9ccebc0 commit cc293e7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

validate.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@
103103
$color = htmlspecialchars($_POST["color"]);
104104
}
105105
}
106+
if ($invalidInputs > 0) {
107+
echo "<p style='color:red;'>Invalid inputs: $invalidInputs";
108+
}
109+
if ($invalidInputFormats > 0) {
110+
echo "<p style='color:red;'>Invalid input formats: $invalidInputFormats";
111+
}
106112
echo "<p>Name: $name</p>";
107113
if ($nameErr) {
108114
echo "<p style='color:red;'>$nameErr</p>";

0 commit comments

Comments
 (0)