Jump to content
Larry Ullman's Book Forums

Chapter 13 - Preventing Spam


Recommended Posts

I've only read the first section and already I'm finding this chapter very useful. 2 questions:

 

1. I've created the spam_scrubber function to use on one of my own forms and during testing the characters \r and \n instead of being replaced by spaces are preceded by an additional slash. $0a and %0d are being replaced by spaces as anticipated. Any suggestions?

 

2. when tabbing to the comments box of the form, the cursor goes to the middle of the first line rather than the start of the first line. this also happens when i test for the condition when name and email are completed but the comment field is not. What do I need to do to have the cursor appear at the start of the comment block. I know this is not strictly a php question, but if you have any suggestions it would be appreciated.

Link to comment
Share on other sites

Thanks for the nice words. Can you confirm what version of PHP you're using and whether Magic Quotes is enabled?

 

As for the second question, I think this is a CSS issue, which perhaps has come up in this forum (or the old forum) before, but I don't recall the solution offhand.

Link to comment
Share on other sites

 Share

×
×
  • Create New...