# Save and query from mySQL on another URL?

**URL:** <https://forum.kirupa.com/t/save-and-query-from-mysql-on-another-url/261906>\
**Category:** programming\
**Created:** [June 1, 2008, 4:25pm UTC](https://forum.kirupa.com/t/save-and-query-from-mysql-on-another-url/261906 "2008-06-01T16:25:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nburlington](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nburlington/32/1365_2.png) [@nburlington](https://forum.kirupa.com/u/nburlington)\
**Post date:** [June 1, 2008, 4:25pm UTC](https://forum.kirupa.com/t/save-and-query-from-mysql-on-another-url/261906/1 "2008-06-01T16:25:30Z")

</div>

I have two domains. I’d like to allow domain A to be able to save and query a mySQL database on domain B. The php scripts and the mySQL are both on domain B. The object making the queries from domain A is a flash file that is accessing the data via sendAndLoad (the .php returns .xml).

Is there something like a crossdomain policy that I can setup to allow this access?

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [June 1, 2008, 5:44pm UTC](https://forum.kirupa.com/t/save-and-query-from-mysql-on-another-url/261906/2 "2008-06-01T17:44:27Z")

</div>

On server A you can setup a php file to simply echo the results from a php file on server B (as long as allow\_url\_fopen is true)…

---

<div class="post-metadata">

**Author:** ![agnus](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@agnus](https://forum.kirupa.com/u/agnus)\
**Post date:** [June 2, 2008, 12:06pm UTC](https://forum.kirupa.com/t/save-and-query-from-mysql-on-another-url/261906/3 "2008-06-02T12:06:19Z")

</div>

[quote=nburlington;2334346]I have two domains. I’d like to allow domain A to be able to save and query a mySQL database on domain B. The php scripts and the mySQL are both on domain B. The object making the queries from domain A is a flash file that is accessing the data via sendAndLoad (the .php returns .xml).

Is there something like a crossdomain policy that I can setup to allow this access?[/quote]

If you need to query from flash to another domain, you need a crossdomain.xml file. See [here](http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14213) for more details.
