Send Post Data: Is there a way to use $_REQUEST function in php to get form values?

  • Profile Image
    kalenjian
    Asked on August 16, 2011 at 01:41 PM

    Hello is there a way to use $_REQUEST function in php to get form values. I am trying to do so but it's not picking up data. print_r($_POST) only gives an array and does not put data in variables that I can use to update DB. Please advise.



    This is a re-post of a comment on How to Post Submission Data to Thank You Page

  • Profile Image
    NeilVicente
    Answered on August 17, 2011 at 10:10 PM

    Hi,

    Using print_r($_POST) in your php page will show you the array's key and the value which you can assign to variables. For example, if your form outputs this:

    eMail = > johndoe@gmail.com

    You can get the value of this key using $_POST['eMail'] then assign it to a variable, for example:

    $myDb_eMail = $_POST['eMail'];

    You may learn more about POST method and arrays by visiting the official PHP manual.

    Hope you find this post useful. Thank you for using JotForm!


    Neil