Calling External File

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SamMan

    #1

    Calling External File

    I am fairly new to PHP programming, and I'm trying to get my head around
    this one...

    I have a form that I am doing validation on via PHP within the same page
    (form.php), so if there is an error, a message will show to the user above
    the form. If all goes well, I would like to call a processing script that I
    have already set up and working to format the users response and send it out
    to a specified e-mail... I'll call it processing.php

    Is there a way that I can, if the form is filled out correctly, make a call
    to processing.php, that will totally leave control of form.php and do it's
    processing?

    I hope that I'm making myself clear...

    --


    SamMan
    Rip it to reply


  • steve

    #2
    Re: Calling External File

    "SamMan" wrote:[color=blue]
    > I am fairly new to PHP programming, and I’m trying to get my
    > head around
    > this one...
    >
    > I have a form that I am doing validation on via PHP within the same
    > page
    > (form.php), so if there is an error, a message will show to the[/color]
    user[color=blue]
    > above
    > the form. If all goes well, I would like to call a processing[/color]
    script[color=blue]
    > that I
    > have already set up and working to format the users response and[/color]
    send[color=blue]
    > it out
    > to a specified e-mail... I’ll call it processing.php
    >
    > Is there a way that I can, if the form is filled out correctly,[/color]
    make a[color=blue]
    > call
    > to processing.php, that will totally leave control of form.php and[/color]
    do[color=blue]
    > it’s
    > processing?
    >
    > I hope that I’m making myself clear...
    >[/color]

    Sam,
    The way it is typicall done is you include a [back-arrow]form
    action=’’ method=post> in your page, you also have <input type=hidden
    name=processed value=’processe d’> in the code too.

    Now if someone clicks, you check on the same script page for
    $_POST[’processed’] and if it has the value ’processed’ then you start
    checking for errors. If no errors, then you can do a php "include"
    of the "processing.php ".

    Hope this helps.

    --
    http://www.dbForumz.com/ This article was posted by author's request
    Articles individually checked for conformance to usenet standards
    Topic URL: http://www.dbForumz.com/PHP-Calling-...ict132942.html
    Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=444061

    Comment

    Working...