Results 1 to 2 of 2

Thread: Javascript to php

  1. #1
    Join Date
    Jun 2009

    Javascript to php

    Hi All,

    Wasn't sure which forum to put this into, but hopefully i've got the right one!
    What i'm a bit confused about is how to pass variables defined in javascript into a php script.

    I have the following on a simple html/php page: a text box (input) and two drop down menus (populated already). and a submit button

    When I click 'submit' I need to pass the variables from the input box and both drop down menus to the php page (iip.php).

    Anyone care to shed a bit of light? I'm not so bad in php, but javascript confuses me a bit!

    Thanks in advance


  2. #2
    Join Date
    May 2009
    There's three ways I can think of off the top of my head:

    The first is use an AJAX system to submit the variables and the form values together via JavaScript.

    The second is to change the form action to append the JS variables as get parameters.

    The third is to insert the variable values into hidden fields in the form on submission.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center