Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7793109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:22:53+00:00 2026-06-01T22:22:53+00:00

So, here is the question. I have a small flash application that sends some

  • 0

So, here is the question. I have a small flash application that sends some variables to a php script (via POST), and that php script sends them to a mySQL database.

This works fine when I’m testing my flash offline, I go to phpmyadmin, and the registry is done. When I upload the swf to a online html, this stops working. It no longer creates another registry in the database. I have no ideia why this happens.

I read a bit about it and found out about cross domain policy, and thought it might be the problem. Thus I made a small .xml file and uploaded it to both servers (the one the swf is on, and the one that has the database), and its still not working.

Here is my crossdomain.xml file (named that way):

 <?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy> 

And the php (named insert.php), that is on the same server as the database:

<?php

//connect to the local MySQL
$connect=mysql_connect("localhost", "DBName", "DBPass");

//select your database
mysql_select_db("DBTable");

//query the database
$query="INSERT INTO results(Nome,Email,Idade,Profissao,Pais)
VALUES
('$_POST[nome]','$_POST[email]','$_POST[idade]','$_POST[profissao]','$_POST[pais]')";


//$result=mysql_query($query);

if (!mysql_query($query,$connect))
{
    die('Error: ' . mysql_error());
    echo "InsertOk=NotOk";
}else{
    echo "InsertOk=Ok";
}

mysql_close($connect)
?>

Thank you!
Marco Roberto

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T22:22:54+00:00Added an answer on June 1, 2026 at 10:22 pm

    Apart from obvious security flaws, try to

    "INSERT INTO results(Nome,Email,Idade,Profissao,Pais)
    VALUES
    ('{$_POST['nome']}','{$_POST['email']}','{$_POST['idade']}','{$_POST['profissao']}','{$_POST['pais']}')";
    

    Basicly add {} and ''.

    EDIT:
    Nevermind that part. Noticed it’s not relevant.

    I believe you have to do the call to your own site, and use CURL to pass $_POST-values to the other domain.

    Try this answer
    Even though this is for javascript, I belive the same rules apply for your swf file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is a question that I have had for some time but never actually
I have an other active question HERE regarding some hopeless memory issues that possibly
here's my question: I have an MVC3 C# application and I need to update
I have a question here regarding iPhone app submission. I have a free application
The question I have here is for some reason when the getInboxUnreadMessagesCount js function
here is a good question: I have an application compiled for iPhone OS 2.21.
C# question here.. I have a UTF-8 string that is being interpreted by a
Noob question here! I have an array with hashes that looks like this: arr
I have a quick question here. I know that the cakePHP find('first') function returns
I have here a small question. I wrote a small multi threaded app which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.