Jump to content

How do you match information using php?


fayecuadra

Recommended Posts

uhm, hello, good evening..I am required to do a website where PHP and mysql is used. I just started studying a month ago. I am supposed to match information from two different databases. I kinda need help since I really am not expert in PHP. I am on my 4th year highschool and its my project. I am already behind some of the researches my classmates are doing. I dont understand some of the PHP codes. I was already able to accept user given information and save it to database. I am currently using XAMPP but I also already have my webserver. Uhm, my next step to do is match the user given information. I have some ideas in mind but I could not put it as codes. I am currently practicing retrieving information since after matching, these matched information would be retrieve and send to email. Could anyone help me? :)

Link to comment
https://forums.phpfreaks.com/topic/129569-how-do-you-match-information-using-php/
Share on other sites

You probably/might want to do something like this:

 

$search = 'find this text';
$sql = mysql_query("SELECT * FROM table_name WHERE MATCH (`column1`,`column2`) AGAINST ('$search' IN BOOLEAN MODE)");
echo '<h1>Found: '.mysql_num_rows($sql).' Results</h1>';
while($row = mysql_fetch_array($sql)){
     echo '<p>'.$row['column1'].' :: '.$row['column2'].'</p>';
}

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.