Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder o0O0o.o0O0o's Avatar
    Join Date
    Jan 2008
    Location
    C:\Windows\System32
    Posts
    1,018
    Thanks
    19
    Thanked 9 Times in 9 Posts

    Showing transitions of pages users between pages

    hi ,



    i have a payment processing system
    Page 1 contains form for CC detials
    Page 2 or script is called when user submits form from page 1. it performs transaction send user to page3

    Now i have changed the server and thats is taking more to process transaction about 17-18 seconds.

    Now what i want is as tranaction is taking place i show on the small screen at the center of page e.g

    Code:
    processing transaction
    
    bank contacted ...
    
    payment approved
    
    redirecting to page ....
    so that customer knows what is happeing


    but i am not sure on which page i code this



    Even when i put echo statement on page 2 where processing is taking place it is not showing anything . when i submit form , it styas on page 1 for 16-17 seconds and then on page 3

    I am not seeing any ouput (echo) from page 2

    whay is this so

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,538
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    The delay must be in the sending of data to server and reading data
    on page 2 ... I'm assuming you are using HTTPS (secure server) on the
    pages because you're gathering CC information?

    So, the delay happens before page 2 is displayed ... it then displays so
    fast and redirects to page 3, you don't see it.

    I don't really have an answer to this because you don't really have
    control over how long it is taking your server to process the variables.

  • #3
    Senior Coder o0O0o.o0O0o's Avatar
    Join Date
    Jan 2008
    Location
    C:\Windows\System32
    Posts
    1,018
    Thanks
    19
    Thanked 9 Times in 9 Posts
    on page 2 after getting the responase from bank , i am updating databse for approved transcationand all that and then i redirect to page 3.

    Is this not possible that after reaching certains points i can display the text in the box
    which can indicate that system has reached at this point

  • #4
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts
    A way (though there may be others) is to use AJAX, and ob_flush. With AJAX, people normally wait for the page to totally done processing (response code 4 I think) but if you start looking at the response before it is complete (3 i think) then you can display information about what is occurring on the server side while its loading.

    A crappier way of doing this would be to load a page that makes it look likes its doing step 1, step 2, etc. but really has already run the script. (If you want to do this, but don't want to wait for the script to finish first, use register_shutdown_function.) Though never the best idea, this can come in handy for cases when (for whatever reason) your users feel like they need to see something happening.

    (For instance, I have an AJAX save button on one of my web applications. My users kept clicking them over and over again because they thought that it was saying "Saved" too quickly to have actually saved, so I added a delay to it. Same type of idea here. Again, not the ideal way to go.)
    If I'm postin here, I NEED YOUR HELP!!


  •  

    Posting Permissions

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