I’m working on a Google Maps webapp displaying BART train times, and when you click on a pin at a BART station, an infowindow pops up, that has a php script in an iframe that runs, and shows the times that were parsed from BART’s XML feed.
What I would like to be able to do, is call the PHP script from the iframe, like it is now, but add command line arguments (I’m not sure if such a thing is even possible).
Here is my code so far that works.
if(end.match(patt1))
{
response.routes[0].legs[0].end_address="Colma BART station<br />"+"Upcoming trains<br />"+'<iframe src="bart1.php" frameborder="0"; width="200" scrolling="yes" ></iframe>';
}
So, instead of “bart1.php” can I change that too something like “bart1.php -a foo”?
Thanks,
Amanda
Use the
$_GETarray.An example:
http://www.webapp.com/test.php?stationnumber=4Retrieve the station number by doing this:
$stationnumber = intval($_GET['stationnumber']);(intval is there if it is supposed to be numerical input)