Web Hosting Talk







View Full Version : Fill form by link from iphone app


renatino
12-19-2009, 07:50 PM
Hello to all,

i'm just create a page with form with lat and long value but i need to autoinsert value in page form with direct link generated from iphone gps app.

example

link generated from iphone app:

mydomain.com/index.html value1 value2


and my form fill automatic

lat: Value1
Long: Value2

My questions are:


Is possible use html in page with auto fill form (i prefer NOT use php)?
Can you suggest me example link for autocompile form in html page?
Can you suggest me example 2 line form with auto fill option?


Many thanks :D

mattle
12-19-2009, 11:39 PM
Well I'd start by formatting the url like a GET request:

http://www.example.com/index.html?lat=value1&long=value2

@1. Why not use PHP (or any other server-side technology)? It could very much simplify this task.

@2. Nothing in HTML is "compiled," let alone "autocompiled," whatever that is.

@3. If you're dead set against PHP, I'd use javascript. You'll have to parse the value of window.location, find your variables and then set the values of your form inputs based on what you extracted from the URI. Being a client-side technology, though, JS won't be as reliable as a server-side option.

renatino
12-20-2009, 07:02 AM
Thanks for help,
if i use php the page isn't centered for 1-2 pixels.

i try php but....how create a form whit value 1 and 2?

xtrac568
12-20-2009, 09:16 AM
Thanks for help,
if i use php the page isn't centered for 1-2 pixels.

i try php but....how create a form whit value 1 and 2?
you retrieve values by


$lat = $_GET['lat']; //value1
$long = $_GET['long']; //value2