Advertisement
demetriusPop

Untitled

Dec 13th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <?php
  2. /*
  3.  
  4. Template Name: myTemp
  5.  
  6. */
  7.  
  8. global $wpdb;
  9.  
  10. if(isset($_GET['search-custom-table']) && $_GET['search-custom-table'] != '') {
  11. $user_search = esc_attr($_GET['search-custom-table']);
  12. $address_table = $wpdb->prefix . "address_table";
  13. $myrows = $wpdb->get_var( 'SELECT city FROM ' . $address_table );
  14. global $myrows;
  15. }
  16.  
  17. var_dump($myrows);
  18.  
  19. ?>
  20.  
  21. <form method="get" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
  22. <input type="text" name="search-custom-table" id="search-custom-table" />
  23.  
  24. <input type="submit" class="" value="Search" />
  25. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement