Announcement

Collapse
No announcement yet.

User defianable variables and PHP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    User defianable variables and PHP

    Hi

    I have made three custom questions each with a drop down selection in Act_Order02.html. I want to take the variables and throw them out to a php file so that I can track the answers. Any suggestions as to how I do this without interfering with the order process?

    Thanks for all the help so far.

    ________________________________________________________________

    www.yoursif.com - Quality Cookware and Homewares at low prices.

    #2
    I would try it this way:

    1) Create an IFRAME element in the order page like so:

    Code:
    <iframe src="" name="tracker" style="display:none"></iframe>
    2) Wrap your custom drop-downs in a form tag:

    Code:
    <form name="trackerForm" action="tracker.php" target="tracker" method="POST">
    ...
    </form>
    3) Lastly add a small javascript function to the <form> tag that surrounds the 'Next' button:
    Code:
    <form.... onsubmit="tracker()">
    The javascript function itself should be put in the header tag or inside actinicextras.js:

    Code:
    function tracker(){
    document.trackerForm.submit();
    return true;
    }
    When the user clicks the Next button, the javascript function will fire. It causes the form you created to be sent to your PHP page in the background through the invisible iframe, while the user is carried to the next stage.
    www.gbradley.co.uk
    Web Development, Actinic Patches, Scripts & more

    Comment


      #3
      Thanks

      Thanks for your help. It is very much appreciated. My JavaScript is a little rusty but I will see what I can do. I will let you know how I get on.

      ________________________________________________________________

      http://www.yoursif.com - Quality Cookware and Homewares at low prices.

      Comment

      Working...
      X