?
Solved

How do you Query a Database using an Image Map and PHP

Posted on 2008-06-25
2
Medium Priority
?
225 Views
Last Modified: 2013-12-12
I am using Dreamweaver CS3, PHP5 and MySQL 5 (I think). I have a database with several tables and can display the data on web pages created with Dreamweaver by selecting pages from the site navigation.  Each page has a table tied to a query using Dreamweavers recordset behaviour.

I have a table called suppliers and would like to return the list of suppliers in specific countries by clicking hotspots on a map of the world. Is this possible?

Im guessing this is something to do with parameter queries, but as Im new to this I dont know where to start.

Can anybody help please?

0
Comment
Question by:ianwills
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
mankowitz earned 1500 total points
ID: 21869618
First you make an image map.. see http://www.graphicsacademy.com/howto_imagemap2.php

Then, once you get the state they clicked on, your SQL will look something like this
SELECT * FROM table WHERE state=xxx

An example:
in php, suppose the imagemap field was called "state"
$result = mysql_query("SELECT * FOM table WHERE state='{$_POST['state']}'")
0
 

Author Comment

by:ianwills
ID: 21878484
Thanks Mankowitz, that a great help.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question