Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Sussex, England

    PHP Variable Troubles

    I'm having a slight problem with PHP in that I want to pass a set of variables through one script, and then onto another 3rd script, however I can't seem to be able to do this.

    The script works with a form being submitted and processed to check that all of the data is correct. If the data submitted is not correct and valid then the form is displayed again and the errors are shown.

    What we want/need to do is pass these variables onto another script that performs some more complicated functions with them. We do need to pass the variables to a third script as this script handles various other forms from the site, although directly. Ideally we do not want to post the form directly to this script as this we do not want to complicate the functions in it even further.

    So how do we pass these variables, ($firstName, $surName and $telNumber are a few) to this script? We also want to avoid using another page for the user to confirm the details (and we could put hidden fields in here) as the customer does not want this.

    All help on this is appreciated, and apologies if this is a simply issue with an obvious solution.

  2. #2
    Write a class to perform this function. Then include this class into the script that you want the variables to be process.

    PHP is object oriented!


    <Signature to be setup in your profile>
    Last edited by choon; 07-22-2005 at 09:27 AM.

  3. #3
    Join Date
    Mar 2004
    Kingston, Canada
    If I have this right there are three pages:
    The form
    A processing script
    A third page (which is a script).

    Simply include the third page in the processing script then call the required functions.

    ie The call in the processing script to the third script.
    advancedErrorChecking ($_POST['fname'], $_POST['lname'], ... )
    My site:

Posting Permissions

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