Hello
I wrote out script 11.1 in chapter 11 and the form seems to be working with one exception.
I can't get an error to show up when no quote is submitted.
here is the code with the conditions:
if (!empty($_POST['quote']) && ($_POST['quote'] != 'Enter your quotation here.') ) {
}else{ //failed to enter a quotation
print '<p style="color:red;"> Please enter a quotation!</p>';
}
This is not working, I get no error message for submitting nothing, in fact, the 'Enter your quotation here' is recorded in the quotes.txt.
BTW , The condition below is working, I tested the other else statement:
else {//could not open file
print '<p style="color: red;">Your quotation could not be stored due to a system error.</p>';
}
when I moved the quotes.txt file to another directory, I did get the above error message.
Did I miss something?
Thanks
FYI I really love this book and can't wait to get to your OOP book.