0 Replies Latest reply on Apr 7, 2011 9:09 PM by ntay

    Using Export Field Contents to Create a Webpage with some PHP

    ntay

      Title

      Using Export Field Contents to Create a Webpage with some PHP

      Post

      I'm trying to write a script to create a webpage file with some php in it. I'm constructing all the code for this webpage in a script in FileMaker which saves to a text field then uses "export field contents" to write the code to a file on my web server. Everything seems to work great, but the php code in the webpage does not seem to work. When I "view source" on the webpage and compare it a php file that I built from scratch, it looks identical except the php does not seem to have compiled in the version of the file that was exported from FileMaker. 

      The url for this webpage is: http://hs-srv1.sccoe.org/GoogleMapHSNew.php?mylat=37.2605870&mylon=-121.9503290http://hs-srv1.sccoe.org/GoogleMapHSNew.php?mylat=37.2606870&mylon=-121.9503290

      For comparison, the url for the working page (built from scratch) is: http://hs-srv1.sccoe.org/GoogleMapHSNew.php?mylat=37.2605870&mylon=-121.9503290http://hs-srv1.sccoe.org/GoogleMapHS2.php?mylat=37.2606870&mylon=-121.9503290

      http://hs-srv1.sccoe.org/GoogleMapHSNew.php?mylat=37.2605870&mylon=-121.9503290http://hs-srv1.sccoe.org/GoogleMapHS2.php?mylat=37.2605870&mylon=-121.9503290
      The php in the code is supposed to pull the latitude and longitude out of the url and process it, but it's not working...

      Here is a part of the code from the webpage my FileMaker export:

      // Create the map and center it on a default location
      var map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(<?php echo $_GET["mylat"]; ?>, <?php echo $_GET["mylon"]; ?>), 12);

      For comparison, here is what it should look like when you "view source":

      // Create the map and center it on a default location
      var map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(37.2606870, -121.9503290), 12);

      Does anyone have any ideas? Does it have to do with the UTF encoding that FileMaker uses with the export field contents script step? I've run out of ideas.