Jump to content

[SOLVED] how to trigger execution of two other php files if a condition is satisfied


phplearner2008

Recommended Posts

Hi,

 

I have expressinterest.php file where I insert values FROM, TO to database

 

$sql = "INSERT INTO interests_sent(FROM,TO) values($FROM,$TO)";

$result = mysql_query($sql) or die("Query: " . $sql . "\n\n" . mysql_error());

$sql1 = "INSERT INTO interests_received(FROM,TO) values($FROM,$TO)";

$result1 = mysql_query($sql1) or die("Query: " . $sql1 . "\n\n" . mysql_error());

 

If $result is successful, I want another php file called InterestSent.php file to  execute a SELECT query & echo result in that page.

 

Similarly, if $result1 is successful, I want another php file called InterestReceived.php file to execute another SELECT query & echo result in that page.

 

How can the files InterestSent.php and InterestReceived.php be made known that $result and $result1 were successful?

I cannot use "header" tag as it will direct the page to another php file, whereas I want two other php files to execute separate queries based on the results of this page.

 

Anyone who can help me with this?

Thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.