Hi everyone!
Im actually doing my final year project which is an ecommerce application for a specific business. there is another student who is working on the MIS part of this business. we have to use the same database.
I am using PHP and MySQL and he is using ASP.net and MYSQL.
My question is:
since we have two different applications and the same database, how do I link these two applications?
for instance, in my ecommerce application, when a customer makes an order, the application needs to alert MIS part. we have to submit two different app but using the same database..
can anyone give me an idea or links on how to do it?

Thanks,
Chupi

Re: two applications one database 80 80

Please be more clearer, If an user submits application what exactly has to happen? do you have to perform two functions of which one is in your php page and another in asp page of your friend? Or do you have to update two tables (or columns ) with the information?


If your problem is to update two different tables (or columns) you can use single/two mysql_query("update..."); instruction.

If on submission you have to report it to your friend you can use a new column having value 1/0 .You set it to 1 when form is submitted and your friend can set it back to 0 when he is done with it.

Re: two applications one database 80 80

Thanks for the reply flashy..
when a user submits an order in my php page, my app should inform his MIS that an order has been received..something like that..
i want to know how can this be done since we have 2 separate applications..I mean how can make my application interact with his app since we have to present two separate projects?
sorry if im not clear enough..

thanks again

Re: two applications one database 80 80

1. He could poll the database to see if there have been any changes.
2. He could write a specific page which you can trigger.

Re: two applications one database 80 80

If your only trouble is to inform is to inform him of a new submission, if you both are using the same table you can have a column named pending and set it to yes when a form is submitted, then your friend will check through his app if any new form is submitted and will take action.

or

If you have to execute both yours and his functions that are written in different languages you can use AJAX to perform both functions on submission.


If that's tough and if his page can receive values through post or get you can get contents of his page through file_get_contents() function and display it.

Eg:
$his_page_content= file_get_contents("his_page.asp?var1=blah&var2=blah");
[use user submitted info for var1 and var2 instead of blahs]

You can fetch the contents of your friend's page for the values an user submits using form on your page and display both your values and his.

[If he has html as o/p you have to search for the values you need inside html and display it to users by making use of preg_match

Re: two applications one database 80 80

I think I got it now...
using the column pending is the best solution.
Thanks a lot flashy!
:)

Re: two applications one database 80 80

It only takes few mins to learn using AJAX, it comes handy

Be a part of the DaniWeb community

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