3 Replies Latest reply on Aug 14, 2014 11:28 AM by rob day

    How do I pass data from a swf file to a php page using InDesign?




      I am currently attempting to create a star rating system in InDesign CC. Essentially, a user will click a star that is associated with a number in a predefined text field, the number will be passed to a php page, the php page will update a database, and then the user will be directed to a separate page that will present him or her the number of the selected star, along with an average of all the ratings.


      I wanted to do all of this in html and php, but I am required to keep the rating system form in a swf format. Originally, I made each star go to a separate php page. The php page contained the value. This worked well, but it does not make much sense to have the swf go to multiple php pages.


      I would like to be able to click a star which will submit a predefined form (If I click the first star it will submit "1") to a php page. I created a button over each star that will "Go To URL" and "Submit Form", but my php page does not display any of the numbers. I have the numbers in separate text fields, each one labeled accordingly. For example, 1 is labeled as "one" in the Name field on Buttons and Forms. Is the name of the text field the variable sent to the php page with the number as the value?


      Maybe my php is incorrect. I deleted all of the text fields, except for one and tried to use both GET and POST in the following manner:



      echo "hello";

      echo $_POST["one"];

      echo $_GET["one"];



      Instead of being displayed "hello 1" I am only shown "hello"


      Is it even possible to submit predefined form data from a swf file to a php page? Am I using the right names?