Hi,

I have some problem posting data to other page. Now i am explain. One page (called A.php) is refershing and checking database whether status 1 or 0. If sataus finds 1, A.php page posting values to B.php automatically.

Then i need to confim whether B.php page getting values or not from A.php. Suppose If B.php page did not get the values from A.php, I need to resend once again to B.php page.

So the problem is , once i sent the values first time from A.php to B.php, as we know suddenly A.php page has gone and display B.php. I can not resend once again from A.php. How we can send Once again from A.php to B.php?

I dont want open new tap at all. Please give me correct solution.

Thanks
William

What is the purpose of B.php, and what does it do with said values?
The simple solution is to say that if B.php doesn't have the values, you redirect back to A.php using

header("Location: http://site.com/A.php");

BUT I suspect that there is a better way to do what you want. Why do you need to send values from one page to the other? If B.php has access to the DB, couldn't you access the status check in B.php?

Hi,
Thanks for your kindly reply. Actually we are running one payment application like paypal. http://merchentsite.com.my/return.aspx or php - this is return page for other merchent website. Once the user completed transactions using some X or Y bank with using payment system, We are sending some values to http://merchentsite.com.my/return.aspx.

Once they getting our values, no problem for us. Suppose, if they are not getting values, we need to send once again that values. I giving example code below


htpps://oursite.com.my/sendtomarchent.php

<?php

function sendMerchent(){
$str='<form name="frmpay" method="post" action="http://merchentsite.com.my/return.aspx">';
$str.='<input type="hidden" name="status" value="2">';
$str.='<input type="hidden" name="ord_mercref" value="12345">';
echo $str.='</form>';
}

sendMerchent();

?>

once call this function , this page redirect to http://merchentsite.com.my/return.aspx. I want to alive sendtomarchent.php this page. But i do not want to open new tap using target_. How we can check check once again whether values sent or not ? Also That merchent return two parameters to us
FROM http://merchentsite.com.my/check.aspx
TO htpps://oursite.com.my/sendtomarchent.php

I think u should understand. plz reply

I guess you can put the PHP code for Posting in A.php only.

You can use flags and an if condition like

if(isset($_POST) && $_POST=='Submit') /* submit is the name of your submit button */
{
Do PHP stuff when form is submitted
}
else
{
Do PHP stuff for fresh page.
}


You can use the flag variable in this code to display the HTML code differently when flags are set.

Hi,

Thanks for your reply. I can try using this one.


Thanks
William

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.