The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> interactive map that updates form?, I have a clickable map for visitors to zoom into their location... I&#
EricE
post Apr 5 2010, 05:37 PM
Post #1





Group: Members
Posts: 3
Joined: 5-April 10
Member No.: 11,584



So, I've made an interactive map (just a series of pngs and poly coord maps that simulate zooming into an area)... the last click I'd like to forward them to a contact form that has "captured" the last thing they've click and has pre-filled out the address portions of the form... ie country, state, zip, etc. How do I do this... forms are easy enough I just don't understand how to send that data to the next page unless the previous page itself was a form but that being said I still don't know how to do that. Anybody know how I could accomplish this?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Apr 5 2010, 06:22 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



In general, the first form submits data to a server-side (e.g., CGI, PHP) program, and then the server-side program generates the second form, filling in data from the first form as appropriate.

What kind of programming experience do you have? What kind of server-side programs can you run on your server?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
EricE
post Apr 7 2010, 10:47 AM
Post #3





Group: Members
Posts: 3
Joined: 5-April 10
Member No.: 11,584



My programing experience is negligible aside from html and css if you'd even call that programing. We do have our own servers so we can run whatever we need to. We have mySQL, php5, filemaker already running.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
EricE
post Apr 7 2010, 03:12 PM
Post #4





Group: Members
Posts: 3
Joined: 5-April 10
Member No.: 11,584



So, I found this would probably be the easiest method to achieve what I'm after ( <input type="text" name="building_country_id"><?php echo($_GET['building_country_id']); ?></input> ) however I'm having a bit of trouble implementing it with the mysql fetch that populates the country list from our database. I don't want to remove that functionality in case someone clicks another country by mistake I'd like the correction to be quick.

Here is the code we currently use to populate the country list...

<select name="building_country_id">
<?php
$query = "select * from countries order by country_name";
$result = mysql_query($query);
$sqlError = mysql_error();
if (!empty($sqlError)) {
logError($sqlError,$query,__LINE__);
}
while ($row = mysql_fetch_array($result)) {
?>
<option value="<?php echo $row['country_id'] ?>"<?php echo ($row['country_id'] == 1000 ? " selected" : "") ?>><?php echo $row['country_name'] ?></option>
<?php
}
?>
</select>

This post has been edited by EricE: Apr 7 2010, 03:16 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 10:52 PM