Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: myTemp
- */
- global $wpdb;
- if(isset($_GET['search-custom-table']) && $_GET['search-custom-table'] != '') {
- $user_search = esc_attr($_GET['search-custom-table']);
- $address_table = $wpdb->prefix . "address_table";
- $myrows = $wpdb->get_var( 'SELECT city FROM ' . $address_table );
- global $myrows;
- }
- var_dump($myrows);
- ?>
- <form method="get" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
- <input type="text" name="search-custom-table" id="search-custom-table" />
- <input type="submit" class="" value="Search" />
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement