Jump to content

Quick Search Widget


Recommended Posts

I am working on a site for someone and altered the quick search widget (that came with the plugin) in the footer. It searches by country, which then populates states, which when chosen populates city choices. The only page it will function correctly is on the members page of the plugin. Will not work on any other page. Can someone please take a look at my code and see where I went wrong?


Edited by H6D
Link to comment
Share on other sites

Copyright (C) www.DatingSolutions.biz - All Rights Reserved!
Author - MyAllenMedia, LLC
WordPress Dating Plugin
global $wpdb;
global $current_user;
$user_id=$current_user->ID; // print session USER_ID
// table name
$dsp_country_table = $wpdb->prefix .DSP_COUNTRY_TABLE;
// table name
global $wp_query;
$page_id = $wp_query->post->ID; //fetch post query string id
$posts_table = $wpdb->prefix ."posts";
$dsp_general_settings = $wpdb->prefix .DSP_GENERAL_SETTINGS_TABLE;
$member_page_title_ID= $wpdb->get_row("SELECT setting_value FROM $dsp_general_settings WHERE setting_name='member_page_id'");
$post_page_title_ID= $wpdb->get_row("SELECT * FROM $posts_table WHERE ID='$member_pageid'");
$member_page_id=$post_page_title_ID->ID; // Print Site root link
$dsp_general_settings_table = $wpdb->prefix .DSP_GENERAL_SETTINGS_TABLE;
$check_couples_mode= $wpdb->get_row("SELECT * FROM $dsp_general_settings_table WHERE setting_name = 'couples'");
<?php // if member is login then this menu will be display
if ( is_user_logged_in() ) { // CHECK MEMBER LOGIN
<form name="frmquicksearch" id="frmquicksearch" method="GET" action="<?php echo get_bloginfo('url');?>/<?php echo $post_page_title_ID->post_name?>">
<input type="hidden" name="pid" value="5" />
<input type="hidden" name="pagetitle" value="search_result" />
<? } else { ?>
<form name="frmquicksearch" id="frmquicksearch" method="GET" action="<?php echo get_bloginfo('url');?>/<?php echo $post_page_title_ID->post_name?>">
<input type="hidden" name="pgurl" value="g_search_result" />
<? } ?>
<input type="hidden" name="Pictues_only" value="P" />
<div class="sinder-bar-form">

<select name="cmbCountry" id="cmbCountry_id">
<option value="0"><?=language_code('DSP_SELECT_COUNTRY');?></option>
$strCountries = $wpdb->get_results("SELECT * FROM $dsp_country_table ORDER BY country_id");
foreach ($strCountries as $rdoCountries) {

echo "<option value='" . $rdoCountries->name . "' >" . $rdoCountries->name . "</option>";
<div id="state_change">
<select name="cmbState" id="cmbState_id" style="width:110px;">
<option value="0"><?=language_code('DSP_SELECT_STATE');?></option>

<!-- End City combo-->
<div id="city_change">
<select name="cmbCity" id="cmbCity_id">
<option value="0"><?=language_code('DSP_SELECT_CITY');?></option>

<!-- End city combo-->

<p><input name="submit" type="submit" class="dsp_submit_button" value="<?=language_code('DSP_SEARCH_BUTTON');?>" /></p>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.