Jump to content

Search the Community

Showing results for tags 'autosuggest'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I'm hoping someone can help me out with this, I'm relatively new to PHP as my background is ASP, so I'm a bit stuck. I'm using the following code as demonstrated here htmlblog.us/jquery-autocomplete ...and I've customized it (slightly) to pull information from my mysql database. Everything is working fine, however, my problem is that when the user selects a specific location from the dropdown, its passing over the suburb, the state, and the postcode. I only want to pass over the postcode value, so I can handle the results easily on the search results page. If I use this.... while( $row = mysql_fetch_array($rs, MYSQL_ASSOC) ) { $data[] = array( 'label' => $row['pcode_area'] .', '. $row['pcode_state'] .' '. $row['pcode_postcode'] , 'value' => $row['pcode_area'] .', '. $row['pcode_state'] .' '. $row['pcode_postcode'] .'; ' ); It posts this to my search results page... (eg showing a search for Brisbane, QLD; 4000) Array ( [zipsearch] => BRISBANE, QLD 4000; ) I only want the postcode value. So instead, I would like ... Array ( [zipsearch] => 4000; ) I tried doing this.... while( $row = mysql_fetch_array($rs, MYSQL_ASSOC) ) { $data[] = array( 'label' => $row['pcode_area'] .', '. $row['pcode_state'] .' '. $row['pcode_postcode'] , 'value' => $row['pcode_postcode'] .'; ' ); ..which passes over just the postcode like I want, but that's no good because upon selection, the suburb and state disappear leaving just the postcode in the selection box, which may confuse people. I'm pretty sure there's an easy way to do this, but being new to PHP, I'm a bit lost. I would really appreciate some help with this, as I'd like to get this sorted ASAP. Thank you. John
×
×
  • 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.