Jump to content

ereg() issues with <textarea>


lead2gold

Recommended Posts

I'm trying to parse a <textarea name='textarea'></textarea> after a submit. Everything parses fine until someone creates a new line (presses enter)

[code]
if (!ereg('^[0-9A-Za-z\r\n\t<>&()\/\'\" ]+$', $POST['textarea'])){
  echo "error";
}
[/code]

I thought \r and(/or) \n are the commands that are created a new line, but it appears it is something else. The regular expression defined above won't pick it up.
What am i overlooking/doing wrong?
Link to comment
https://forums.phpfreaks.com/topic/6987-ereg-issues-with/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.