Find Jobs
Hire Freelancers

211822 PHP Lookup table function

N/A

In Progress
Posted about 16 years ago

N/A

Paid on delivery
Project Autos assign lead to company function Overview I need a function created to auto assign a company name to a lead before it is inserted into our database from our web forms when a user fills in a UK postcode. The scripting language can be PHP or Ajax. Speed is the primary focus as the look up table contains about 10000 or more records and there will be more postcodes added in the near future. Scenario: The web form is filled in and before the data is posted. The function needs to loop through a lookup table and find the matching company name that is associated with postal code filled in by the user. The look up table only holds the first 4-6 digits of the UK post code. It does not hold exact UK postcodes but only the first few alpha numeric characters. The look up will perform the two possible processes • If the leads postcode finds a matching postcode (first 4 - 6 characters) then it needs to populate the company name associated with the look up postcode into the text field called ‘usr_companyName', else • If there is no postcode match or no company name associated with the lookup postcode for the leads postcode then it needs to assign the following outcome ‘Pending' to the ‘usr_companyName' text field. The look up table represents two tables in our MySQL database. With column header lb_postcodeSector, lb_companyName The function needs to be executed when the postcode if filled into the text field called ‘lb_postcode' which will be found on line 126 In the diagram below the yellow zone is where the function will fit in. The lookup table will be provided as well as the embedded image. REQUIRED • The lookup process needs to be fast as the user cannot wait for ages. Ideas to optimise the function are welcome. Speed is vital • An Ajax type busy notification should pop up stating that the form is busy processing data. Server language / database PHP version 4.4.7 MySQL version 4.1.22-standard Time frame ASAP Delivery instructions 1. I require very clear and exact instructions on how to use the function as well as how to deploy and integrate it into our web forms. 2. I will provide the sample web form for you to test on and require the function to be included into the web form. The form supplied will be identical to what i will use so you can use the naming conventions applied as they are exact mappings to the database. 3. The function needs to be in a separate .php page so it can be called from other forms if needed 4. Clear instructions on where to fill in the database connections for the look up function to query the database. For security reasons I cannot provide access to our database or the structure of it. Database table name for the lookup table: • uksectors Tables in uksectors: • lb_postcodeSector • lb_companyName Attached Documents • Postcode Sector [login to view URL] = lookup table • Process flow document = demonstrates the process • Sample web form = Line 144 is the hidden field where the company name needs to be populated. • [login to view URL] – sample provided to indicate that the form is busy processing
Project ID: 1958050

About the project

1 proposal
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
$500 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of
5.0
3
Member since Mar 28, 2008

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.