[REQUEST] String Checker?

Is there a script that when a user types a word in a text box it basically checks 2 tables in a database, and if its in the 1st database it returns “blank is in the 1st database” and if its in the 2nd database, it returns “blank is in the 2nd database”

You can do that one yourself, its just 2 queries.
[php]if(isset($_POST[‘submit’])) {
$find_a = mysql_query(“SELECT id FROM table1 WHERE column = ‘$value’”);
$find_b = mysql_query(“SELECT id FROM table2 WHERE column = ‘$value’”);

if(mysql_num_rows($find_a) != 0) {
echo “$value was found in table1”;
}
if(mysql_num_rows($find_b) != 0) {
echo “$value was found in table2”;
}
if(mysql_num_rows($find_a) != 0 && mysql_num_rows($find_b) != 0) {
echo “$value was found in table1 and table2”;
}
}[/php]
That’s a very basic version of the script, its not really that difficult though to figure out from tutorials.

Sponsor our Newsletter | Privacy Policy | Terms of Service