interactive map that updates form?, I have a clickable map for visitors to zoom into their location... I |
interactive map that updates form?, I have a clickable map for visitors to zoom into their location... I |
EricE |
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?
|
Darin McGrew |
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? |
EricE |
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.
|
EricE |
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 |
Lo-Fi Version | Time is now: 17th April 2024 - 12:13 AM |