Jump to content

Recommended Posts

I am working with a payment gateway, which sends its response with a specific php page.

Lets say response.php, with parameter ?val=data.  ie http://abc.com/response.php?val=data.

 

On this php page, I want to perform some processing, but ultimately dont want to display any html form with this page.  I need some way to perform my processing on this php page, then immediately redirect to another php to display the next form, with the results.  Can anyone advise on how this is achieved?

 

So for example, I want it to then  invoke display.php?mode=1&conf=1, which has the formal display with all the results.  All this with NO user input.

Link to comment
https://forums.phpfreaks.com/topic/53596-passing-control-onto-another-form/
Share on other sites

Sorry, I completely misunderstood your question. My bad.

 

<?php

session_start(); // Start the sessions
ob_start(); // Start an output buffer

// Do all your processing

$result = ob_end_flush(); // $result now contains what would be outputted from your processing
$_SESSION["result"] = $result; // This variable can be accessed from the next page

header("Location: display.php"); // Now we can redirect you to display.php

?>

 

Now in your second page:

 

<?php

session_start();

echo $_SESSION["result"];

?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.