Jump to content

session recall help


I-AM-OBODO

Recommended Posts

Helo all,

I am designing a site that has to do with transaction. i want after each transaction a confirmation be display to the client showing the transaction status wether failed or completed. there is a code that represents each transaction status. each transaction is moved on to another page via session, the problem am having is that after a failed transaction, i tried to anchor to the sattus of failed transfer to payment page but the payment details does appear on the payment page again, i want a situation where the payment details will appear to the client notifying them of failed transfer to to retry the payment again with having to fill all the forms they've filled before.

 

Thanks

Link to comment
Share on other sites

what am actualy saying is that is there a way to recal a session after it has been renamed? take for instance:

 

Page1.php

<? session_start(); ?>

<form id="form1" name="form1" method="post" action="page2.php">

  <table width="100%" border="0" cellspacing="2" cellpadding="0">

    <tr>

      <td>Amount:  <input name="amount" type="text" id="amount" /></td>

    </tr>

    <tr>

      <td> 

        <input name="trxref" type="hidden" value="<? $rand = range(0,10);

shuffle($rand);

echo implode(' ',array_slice($rand,0,8)); ?>" /></td>

    </tr>

    <tr>

      <td> </td>

    </tr>

    <tr>

      <td>

 

Page2.php

<? session_start(); ?>

  <? $_SESSION['amount'] = $amount=$_REQUEST['amount'];

  $_SESSION['trnxref'] = $trxref=$_REQUEST['trxref'];

?>

 

Amount = <font color="#000066" ><b><?php echo $_SESSION[amount]; ?>

<p>

Transanction Ref = <font color="#000066" ><b><?php echo $_SESSION['trnxref'];

?></p>

<p>Click to make <a href="page3.php">payment</a>  </p>

</body>

 

Page3.php

<html>

<head>

<title>Untitled Document</title>

</head>

<body>

<p>

  <?php

$amt = $_SESSION['amount'];

$txRef = $_SESSION['trnxref'];

?>

 

Amount = <font color="#000066" ><b><?php echo $amt; ?></b>

<br>

Transanction Ref = <font color="#000066" ><b><?php echo $txRef; ?>

</p>

</p>

<p><a href="page2.php">Go Back</a>

</p>

</body>

</html>

 

Thats it. I if i click on go back, i want the details (i.e amount and trnxref ref to display) knowing well that the value of amount and trnxref have been reassigned in page3. is there a way i could get these values back if i go to page2?

 

Hope it helps

Thanks

Link to comment
Share on other sites

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.