I-AM-OBODO Posted September 23, 2008 Share Posted September 23, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/125462-session-recall-help/ Share on other sites More sharing options...
jonsjava Posted September 23, 2008 Share Posted September 23, 2008 do you have some code we can work with? Quote Link to comment https://forums.phpfreaks.com/topic/125462-session-recall-help/#findComment-648598 Share on other sites More sharing options...
I-AM-OBODO Posted September 24, 2008 Author Share Posted September 24, 2008 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,); ?>" /></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 Quote Link to comment https://forums.phpfreaks.com/topic/125462-session-recall-help/#findComment-649289 Share on other sites More sharing options...
waynew Posted September 24, 2008 Share Posted September 24, 2008 They will remain in the $_SESSION variables as long as you don't overwrite them, unregister them, destroy the session or forget to use session_start(); Quote Link to comment https://forums.phpfreaks.com/topic/125462-session-recall-help/#findComment-649290 Share on other sites More sharing options...
I-AM-OBODO Posted September 24, 2008 Author Share Posted September 24, 2008 if you go through the code, you'll notice that it has been reassigned, so after clicking go back, it returns an empty result but i want the result that was parsed to the page3 and still on the page3 it must be reassigned? thanks Quote Link to comment https://forums.phpfreaks.com/topic/125462-session-recall-help/#findComment-649293 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.