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

  • SEARCH
  • Home
  • 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 8126181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:04:11+00:00 2026-06-06T07:04:11+00:00

Imagine that I have a form in a flash application with two fields, input1

  • 0

Imagine that I have a form in a flash application with two fields, input1 and input2. And when the user finish filling this form, it goes to a php page.
At the moment, I’m using the $_GET method to send the data.
Like this:

var request:URLRequest;
request = new URLRequest("http://site.com/page.php?data1="+input1.text+"&data2="+input2.text);
navigateToURL(request);

And in the php code:

$_GET["data1"];
$_GET["data2"];

But this way, the information stays in the URL. How can I send this via $_POST?

  • 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-06T07:04:13+00:00Added an answer on June 6, 2026 at 7:04 am

    in AS 3 the URLRequest class you use to specify your request has a method property which can be used to set he HTTP option for submission method, you’ll need to set it to POST using URLRequestMethod constant POST for perfect form or you could use a “POST” string.

    You can find a comprehensive example on snipplr

    so in a nutshell:

    var url:String = "http://localhost/myPostReceiver.php";
    var request:URLRequest = new URLRequest(url);
    var requestVars:URLVariables = new URLVariables();
    requestVars.foo = "bar";
    // ... fill in your data
    request.data = requestVars;
    request.method = URLRequestMethod.POST;
    // after this load your url with an UrlLoader or navigateToUrl
    

    When using Adobe Air You’d need to use the URLLoader class instead of navigateToURL() because of the following tidbit:

    Parameters
    request:URLRequest — A URLRequest object that specifies the URL to navigate to.

    For content running in Adobe AIR, when using the navigateToURL() function, the runtime treats a URLRequest that uses the POST method (one that has its method property set to URLRequestMethod.POST) as using the GET method.

    Basically whenever you want to use POST set method correctly, as also indicated by the documentation for navigateToUrl:

    next in php you’d be receiving the variable in the superglobal $_POST array, where you could access it as such:

    <?php
    $foo = $_POST['foo'];
    /* $foo now contains 'bar'
       assignment to another value is not necessary to use $_POST['foo'] 
       in any function or statement
    */
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

imagine that I have a Form with 9 controls (TabbedStuffControl) in a 3x3 tile,
Imagine that I have a engine gem A that has your application.css and application.js
Imagine that HTML page is a game surface (see picture). User can have n
Googling this does little good, as you can imagine. Does anyone have resources that
I have this form that is using data-defaults and I need to be sure
Imagine that I had a form where I wanted to have a rent date
Let's imagine that we have privacy options page in social network; two group of
Imagine we have a server side application that generates streaming content full of JavaScript
Imagine that I have a nice Deck class, in the best OO fashion. It
Imagine that i have the following code: <a:repeat value=#{bean.getList()} var=x > <li class=la> <span>

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.