Hello,

I have build an html interface with a text area. I want a script that would let me search for text pasted there based on a database. how do I go about it

Recommended Answers

All 2 Replies

use regular expressions
ereg_math or preg_match
if you are not familiar with regular expresion, use simple strpos('textarea content','searched word');

Member Avatar for diafol

You need to download the php manual. Just a word of warning. If you're running a dictionary's worth of words from a db - this'll bite you in the posterior!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.