php - I can't search in my script -


why when use "ab cdefgh" script read "ab" , not read after space ?

<?php $con = @mysqli_connect($host,$user,$pass,$db_name); if (isset($_get['c']) , isset($_get['v'])) {     $license = $_get['v'];     $mac = $_get['c'];      $mac_query = mysqli_query($con,"select * app mac='$mac'");     $fetch_query = mysqli_fetch_array($mac_query);     if ($fetch_query == 0 ) {         $license_query = mysqli_query($con,"select * app license='$license'");         if (mysqli_fetch_array($license_query) > 0 && $license !=='') {             $insert = mysqli_query($con,"update app set mac='$mac'");         }         else {              print "unexpected license";         }     }     else {         $mac_query = mysqli_query($con,"select * app mac='$mac'");         $fetch_mac = mysqli_fetch_array($mac_query);         if ($fetch_mac['active'] == "") {             if ($license == $fetch_mac['license']) {                 $query = mysqli_query($con,"update app set active='active' mac='$mac'");                 echo "active";             }             else {                 echo "deactive";             }         }         elseif ($fetch_mac['active'] == "active") {             ?>             <form method="post">             <input type="text" name="search">             <button type="submit" name="btn-search">search</button>             </form>             <?php             if (isset($_post['btn-search'])) {                 $word = $_post['search'];                 $select_lic = mysqli_query($con,"select * app mac='$mac'");                 $content_s = file_get_contents("http://ask.com/web?q=$word");                 if (strpos($content_s,"did not match answers results.")) {                     echo "false";                 }                 else {                     $select_lic = mysqli_query($con,"select * app mac='$mac'");                     $row = mysqli_fetch_array($select_lic);                     $word = md5($word).",";                     if ($row['license'] === $license) {                         echo "true";                         $query = mysqli_query($con,"insert words (index) values ('$word')");                     }                     else {                         echo "error";                     }                 }             }             else                  echo "";             }         }     } } else {     exit; } ?> 

for example search" ab cdefgh" script read "ab" , don't read "cdefgh" how can fix it?


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -