#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    23
    Rep Power
    0
    hi,

    i have three files
    1) calculat.htm
    2) calculat.php3
    3) out.php3

    here calculat.htm contains the form , when i am submitting that form it goes to calculat.php3 there calculation will be done, and then it redirects the out.php3 file.

    how to do it please help me.

    thank's in advance.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    <<
    here calculat.htm contains the form , when i am submitting that form it goes to calculat.php3 there calculation will be done, and then it redirects the out.php3 file.
    >>


    try like this.


    calculat.php3

    <?
    if(isset($submit)){
    //calculations
    //now redirect
    header("Location: out.php3nn");
    //redirect to out.php3
    }else{
    echo "Error!!";
    exit;
    }
    ?>

    that's it!!

    make sure that no space or no html tag is their before your php deliminator.ie "<?".
    other wise it won't redirect it..


    Good luck!!!





    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    Seaside, CA
    Posts
    84
    Rep Power
    15
    I think this will do it, if you don't send any html or php output before calling it. In calculat.php3 do the calculation, then:

    header ("Location: <A HREF="http://www.yoursite.com/out.php3");" TARGET=_blank>http://www.yoursite.com/out.php3");</A>
    exit;

    But why not just do the calculation and output in the same page?


    ------------------
    From the day we're born, we're running out of time.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Indonesia
    Posts
    87
    Rep Power
    15
    I think you can even write the form, the calculation and the output in one page .

    Just simply just the "isset" function

    if user submit the form it means that the isset($submit) is not 0 then it will do the calculation and the output.

    But if the isset($submit) value is 0
    it means that the form is still empty
    dan you can display the form.

    That's it. I think that's more simple.

    See ya


    ------------------
    ** It's the world of Oscario **

Similar Threads

  1. pulling the url off a page to store it
    By spikeyman in forum PHP Development
    Replies: 3
    Last Post: February 21st, 2004, 02:55 PM
  2. Prefill URL of last accessed page
    By Phil_work in forum HTML Programming
    Replies: 4
    Last Post: February 5th, 2004, 05:21 PM
  3. Replies: 5
    Last Post: January 23rd, 2004, 11:22 AM
  4. passing the url from HTML page to a php
    By lordorkus in forum PHP Development
    Replies: 10
    Last Post: January 20th, 2004, 05:36 PM
  5. How to rewrite URL with Perl redirecting?
    By fablau in forum Perl Programming
    Replies: 5
    Last Post: January 17th, 2004, 09:50 AM

IMN logo majestic logo threadwatch logo seochat tools logo