Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <?php
  2. if (isset($_POST["search"])) {
  3.  
  4. //include database connection
  5.  
  6. $word = mysql_real_escape_string($_POST["search"]);
  7. $word = htmlentities($word);
  8.  
  9. $sql = ("SELECT task_id, task_date FROM customer JOIN task ON customer.id = task.customer_id WHERE mobil = $word ORDER BY task_date DESC LIMIT 0, 10");
  10.  
  11. $results = mysql_query($sql);
  12. if (mysql_num_rows($results)==0) {
  13. echo $word, " text bla";
  14. }else {
  15. echo $word, " text bla bla";
  16. while ($row = mysql_fetch_assoc($results)) {
  17. echo '<pre>', print_r($row), '<pre>';
  18. }
  19. }
  20. }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement