Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['action']) == 'send') {
- //Location
- $file_location = "marry.html";
- //Read the file
- $fileContents = file_get_contents($file_location);
- $search_var = '{'.preg_quote($_POST['keyword']).'}i';
- $matches = array();
- preg_match($search_var, $fileContents, $matches);
- echo '<b>Search Query: </b>'.$matches[0];
- //print_r($matches);
- if(!preg_match($search_var, $fileContents, $matches)) {
- echo "no matches.";
- }
- }
- ?>
Add Comment
Please, Sign In to add comment