Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST["search"])) {
- //include database connection
- $word = mysql_real_escape_string($_POST["search"]);
- $word = htmlentities($word);
- $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");
- $results = mysql_query($sql);
- if (mysql_num_rows($results)==0) {
- echo $word, " text bla";
- }else {
- echo $word, " text bla bla";
- while ($row = mysql_fetch_assoc($results)) {
- echo '<pre>', print_r($row), '<pre>';
- }
- }
- }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement