How to match words with those in the database?

Hi there, I’m wondering if it possible to match words, which are inserted by a form, with for example “id” that corresponds to the word I want a redirection to?

I currently wrote a code which has a href link inside it, with “&word_id=” as a key. The problem is I can’t match the inserted word with the one corresponding in the database.

Any idea or help appreciated.

yes. The SQL commands for that are WHERE, LIKE or–if you need to do a full text search–MATCH.

1 Like

And for what are you using it and how does that relate to the question?

besides, you’re totally open to SQL injection with that.

That depends. using a function would certainly enhance re-usability.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.