fork download
  1. <?php
  2.  
  3. $link = mysql_connect("localhost", "Uname", "Upass", "DBname");
  4. mysql_select_db ("DBname", $link))
  5.  
  6. foreach ($matches as $word){
  7. $str_sql_query = "SELECT id FROM dbCountries WHERE name LIKE '%$word%' OR alias LIKE '%$word%' ";
  8.  
  9. if (!$result = mysql_query($str_sql_query, $link))
  10. {
  11. echo "Sorry, i cant do this.";
  12. exit();
  13. }
  14. foreach ($result as $x){
  15. echo $x, "<br>";
  16. }
  17. }
Runtime error #stdin #stdout #stderr 0.02s 23488KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Parse error:  syntax error, unexpected ')' in /home/KgR4Le/prog.php on line 5