Send Variables Using POST
I'm trying to send variables to a perl script.
The script works fine, as I can send variables to it using the following line...
PHP Code:
on(release) {
getURL("http://www.mySite.com/cgi-bin/myScript.pl?var1=content1&var2=content2", "_blank");
}
But, how do I attach variables if I want to use POST?
FlashKit > Flash Help > Flash MX
Posted on: 04-05-2003, 01:52 PM
View Complete Forum Thread with Replies
Sponsored Links:
POST Variables-Send The Php
Hi,
Ive got my mailing list script all set up, it came with a front end , but i want to allow the user to sign up by filling in a form in flash. I have been trying to send the variables to it but i have been unsuccessful. If anyone knows please let me know.
Thanks
-Mike
View Replies !
View Related
URLLoader Using POST Fails To Send Variables
hopefully this is simple and I'm just missing something obvious. I'm trying to hit a php page using POST data and load the response. what actually happens is the php page is hit using POST but without data. if I navigateToURL with the URLRequest instead of URLLoader.load, the data is sent.
Code:
import flash.events.*;
import flash.net.*;
some_button.addEventListener( MouseEvent.CLICK, _handle_click);
function _handle_click( in_mouse_event:MouseEvent):void {
var url_variables:URLVariables = new URLVariables();
url_variables.a = 1;
url_variables.b = 2;
var url_request:URLRequest = new URLRequest( "index.php");
url_request.method = URLRequestMethod.POST;
url_request.data = url_variables;
var url_loader:URLLoader = new URLLoader();
url_loader.dataFormat = URLLoaderDataFormat.VARIABLES;
url_loader.addEventListener( Event.COMPLETE, _handle_complete);
url_loader.addEventListener( IOErrorEvent.IO_ERROR, _handle_io_error);
url_loader.load( url_request);
//navigateToURL( url_request);
}
function _handle_complete( in_event:Event):void {
trace( "complete");
}
function _handle_io_error( in_event:IOErrorEvent):void {
trace( "io error");
}
thank you for any help
View Replies !
View Related
Specific Size Window With "Paypal Send Variables Using POST"
I know that through Javascript you can control a popup window using javascript.
But I need to control a window, with or without javascript, but using the POST method such as:
code:
_lv["send"]("https://www.paypal.com/cgi-bin/webscr
return="+return_str,"_BLANK", "POST");
The reason being is that i have fairly complicated variables to send to paypal, and from the looks of it, I cannot use variables by using getURL like below:
code:
getURL("javascript:javascript:
openNewWindow
('https://www.paypal.com/cart/add=1&business=order@myaccount.co.uk
&item_name=anyname&amount=21.99
&return=http://www.mywebsite.co.uk&cancel_return=http://www.paypal.com','paypal',
'width=600,height=400,scrollbars,location,resizabl e,status');void(0);");
Unless that is, someone knows different, if so how would I substitute a fixed price (for example) with a price that is currently a variable in the flash movie.
View Replies !
View Related
Send Using Post
how do i go about sending a variable "item" to this php file
Code:
System.security.allowDomain("http://localhost/");
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(selectedFile:FileReference):Void {
selectedFile.upload("upload.php");
};
View Replies !
View Related
Send Using POST
I'm putting a password that links from a flashsite to a html secure site using username and password fields,
the problem is that the "send to POST" in get url of the password doesnt work. Insteag uses GET.
How may I solve this problem to link both pages.
thanx in advanced
View Replies !
View Related
Send And Post In Flash Between 2 Swf;s
I'm sander working on a deaf page for the deaf community, and i like flash alot, but i'm still having troubel with sending variables,
what is supos to happen :
check : http://www.globaldc.nl/flash
--> the first gap in the bridge will load another swf ( not in a movie clip but in level 4
now if you trigger in that movie clip the woman the paper and the rose the stone at the back of the window will drop,
i want to communicatie with the main flash file so that the gap in the bridge is filled with a solid rock, ill have the movie clip made , but how to trigger from a level 4 loaded *.swf ?
hope someone could help me.
tnx
View Replies !
View Related
Send Using Post Not Working When _blank Is Used?
When I send my variables from a flash movie using "get" to an ASP page all is fine, even when I use "_blank" my variables still load. However when I use "Post" they don't load when I use "_blank", they only load when I send them to the same page , but this is no good to me becuase it reloads the Flash movie.
Any ideas?????????
View Replies !
View Related
//send Using Post. From Loaded Movieclip
I hav a main.swf which loads an ext .swf called supply.swf,
supply has a form on it w/ a submit button using send variable using post to the correct .asp url. although when i click submit nothing happens. I have radio buttons w/ values of 0&1 that are making a variable in _root, and text fields w/ jus theyre variable names. does this pose a problem. how do I submit the data from _root, I know the variables are being set because I made little dynamic test boxes that display the variable being set. could someone please help me out hte url is
http://www.sdginteractive.com/fh02 go to the suppplier page and you can see it is a rather large form. like i said i set variables 2 ways input boxes and setting _root.variables.
then SUBMIT using post to the url specified.
View Replies !
View Related
Using POST To Send Data From Flash To ASP
I cannot seem to get POST to work in a LoadVars.send method.
"GET" works fine, but I have to use POST for security.
I am sending the variables to an ASP script. When I try to retrieve the POST using request.form I get NOTHING. If I change the LoadVars method to "GET", everything works fine.
WTF!!!!!!!!!!!!!!!!!!
///actionscript:
doSave_data = new LoadVars();
doSave_data.message = "Hello From Flash";
doSave_data.send("myfile.asp", "_new", "GET");
///myfile.asp:
myMessage = request.form("message")
// does not work!
myMessage = request.form
// does not work!
myMessage = request
// does not work!
View Replies !
View Related
Forcing POST To Send Specified Vars?
There are several http calls that my application makes that requires authorization data to be passed back to the server. This data is located in an authorization object. i currently have a string that appends to the http request but i'd like to know if there is a way to tell POST to send only certain variables, i'd just like to avoid having the auth info passed through as a url string.
View Replies !
View Related
Send Data Via Post To A Php File
ok this is the error
**Error** Scene=Scene 1, layer=Layer 1, frame=2:Line 5: The property being referenced does not have the static attribute. LoadVars.send(_root.address, post); Total ActionScript Errors: 1 Reported Errors: 1
this is the code
stop();
function mysend() {
post = _root.nickname + " : " + this._parent.talk;
loadVariables(sendaddress,_root.chattl);
LoadVars.send(_root.address, post);
this._parent.talk = "";
}
its job
send the var _root.post to file chat.php using the post mehtod
please help
View Replies !
View Related
Encrypting POST Data To Send To PHP
Hey,
I was wondering if there was an effective way, in Actionscript 3.0, to encrypt a string or int so it can be semi-safely POSTed to a PHP file, where it will be decrypted.
I was thinking something along the lines of this:
1. POST the plain text of the String or int
2. Also, POST the encrypted version, probably encrypted with a one-way hash algorithm (MD5, SHA1, etc.).
In the PHP, I would test whether the plain text (after it is encrypted with the same algorithm as in the Flash) is equal to the encrypted value that was POSTed.
(Is/Are) there (an) existing librar(y/ies) in Actionscript for MD5, SHA1, base64, or other changes of base? If so, how can I implement them
-mecablaze
View Replies !
View Related
Using LoadVars To Send Data By POST
Hi all,
For some frustrating reasons, Flash MX is refusing to send data to my PHP page using the POST method. Here's the code I use:
Code:
dataLoader.send("http://localhost/coe/register.php", "_self", "POST");
However, it always got send as a GET. I have no idea why, and the strangest thing of all is that sendng by POST was working only a couple of days ago! I didnt touch the Flash file save for the PHP script.
Any ideas?
View Replies !
View Related
Possible To Send POST Data To PHP File Without Lo
Howdy.
I know I'm posting up a storm tonight.
I was wondering if it were possible to have a flash movie send post data to a php file without the php file loading in the movie window. i'm sending the post via the LoadVars() function.
The only thing i can think of is to send load the PHP file and send the post data into a small hidden IFRAME within the same html doc as the flash movie; or if need be to have it open a small sized window popup.
I'm not sure how to or if you can do with with LoadVars() though. Does anyone know of any way I could work through this?
Thanks!
View Replies !
View Related
Using The Post Method To Send Vars To Php Actually Sends Get ?
Ok i have a site where people can send large amounts of text through to a mysql db from flash it goes from flash to php to mysql. here is the flash code
Code:
var senderLoad = new LoadVars();
sender.onRelease = function()
{
senderLoad.theName = testiname.text;
senderLoad.theEmail = testiloc.text;
senderLoad.theMessage = testimsg.text;
senderLoad.objtype = "testimonial";
trace("Sending... " + senderLoad.theName + " " + senderLoad.theEmail);
senderLoad.send("sendflash.php",senderLoad,"POST");
}
Now this all goes to the sendflash.php which gets the variables using the $var=$_GET['theName']; etc. Yes that is Get but in my code i have POST for some reson it is not sent POST ?? but get i can see it in my browser after i hit the sender button it makes all the vars go into the url. Why dose it do this ? as you all already know sending large amounts of text through the get method is not a very good way to go about things anyone know why this code works this way ? I have tried putting get into the actionscript and i think if memory serves it didnt post anything ??
thanks in advance
oh if it helps the original tutorial where i got this code was from gotoandlearn it had a senderLoad.sendAndLoad("sendflash.php",receiveLoad ); this dose not even pass the variables for some reason i even tried all the original code with the original php file he supplied in the tutorial and it just sent blanks to php. It was a send email form so i made it work the only way i could get it to and made it into a insert message to db form.
View Replies !
View Related
Advanced Dynamic Send / Post Question...
Ok...
Here is the site in question...
http://studioauditions.com
The end goal will be to have the buy now button dynamically take the the user to the actual hard link of the product page...
which would be something like
http://www.frontendaudio.com/ADK_A_51_D ... p/1007.htm
I currently am having the client attach these hard links into the id3 tag artist field and calling on it that way...
BUT, the actual dynamic text field in the lower right corner contains the name of the product proper.
If you type that name into the http://frontendaudio.com search field it works perfectly...
is there a way to do this dynamically with flash / php / asp etc..
basically send and load the text string into a page as a variable to load into a search field and then execute that search....
View Replies !
View Related
Send Variable (POST) On Popup Window (javascript)
I want to send variable from my flash file...
usually i used this script:
on (release) {
getURL ("request.php", "_blank", "POST");
}
but, now i want to remove MENU, ICON, ADDRESS, etc on my explorer...
so i try to use this script:
on (release) {
getURL ("javascript:openNewWindow('request.php','popup',' width=450,height=335,toolbar=no,scrollbars=no');") ;
}
and this on my html file:
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
</script>
but, i don't know how/where i can put "POST" method and "TARGET"...
as i know getURL on flash have 3: URL, TARGET, METHOD
on (release) {
getURL ("request.php", "_blank", "POST");
}
anybody can help??? or have another way to do this???
thx b4
View Replies !
View Related
Post Variables?
hey, is it possible to post only select variables? I was using "delete" to get rid of extraneous variables, but it's gotten out of hand... or is there someway to delete all variables except... ??
View Replies !
View Related
Post Variables
I'm posting variable from inside MX and when it post it send all the other variables also. Does anyone know how to limit the post to just the few variables needed?
View Replies !
View Related
Using Get And Post Without ALL The Variables
Ok, I'm trying to send some variables through the URL. The first attempt was to just send a URL string like this to the Flash file:
myURL = 'http://www.metalblend.com?stuff=10&things=5'
getURL (myURL,'_blank');
What it sends when you click on is this:
http://www.metalblend.com?stuff=10
As you see, it only sends the first variables and cuts off anything after that.
So, I was trying to use get and the only explanation I can find for this is this:
getURL (myURL,'_blank',"GET");
Well, that sends an insanely long string with ALL the variables in the flash file. So, does anyone know how I just send two or three along with the URL?
View Replies !
View Related
Again HELP ME Please, POST Or GET Variables
Hi everyone, i need to get the POST or GET Vars in my Flash Movie.
I have 2 frames:
1. topFrame (topFrame.htm) = Contents a Flash Movie called MENU
2. mainFrame (mainFrame.htm) = Contents de Flash Movie called MAIN
I Call a MENU Movie by MAIN Movie like this...
getURL("topFrame.htm?myvar=abc", "topFrame");
In the MENU Movie I want to detect the variable MYVAR an use the data ABC, how can i do this?
Anyone can help me with this and post any example please?????
I trying to do this since a week ago and i cant!!!! =(
Regards.
View Replies !
View Related
How To Post Variables
Hi I need to post Variables to a php file
but dont want to load a new window I no
loadVariables(); will get them with out loading a window
get(); opens a new window but can send the Variables??
Please can you help, I bet you all do this all the time.
thanks
Brian
View Replies !
View Related
POST Variables Sent As GET
Hi fellows,
I am writing a simple form to send email.
Look what I have done in the submit button (in Flash):
btnEnviar.setClickHandler("onClick");
function onClick(component){
dataSender = new LoadVars();
dataSender.Nome = _root.mcForm.mcForm1.txtNome.text;
dataSender.Send ("http://localhost/dashortensias/flashsendmail.php","POST");
}
In PHP:
<?php
$nome=utf8_decode($HTTP_POST_VARS['Nome']);
print $nome;
?>
Nothing happens, that is, nothing is printed on the screen.
If I change HTTP_POST_VARS by HTTP_GET_VARS it works...
Why Flash is sending the var as GET if I explicited the POST method?
Thanks!
View Replies !
View Related
How To I POST The Variables To CGI?
on (release) {
loadVariables ("http://www.url.com/cgi-bin/feedback.cgi?name=" + aname + "&phone=" + aphone + "&submit_by=" + asubmit_by ,"_blank", "POST");
};
is the code above correct? How to i post the variables? How to i set variables?
Please guide me thru. i'm new in tis.....
View Replies !
View Related
Post Variables To ASP
Hi there, I have this little issue I can't seem to get around...
I made a guestbook in flash. Maybe I completely missed out on something but as I understand it there's no actual form class or anything, I just use getURL with method POST and it will send my vars.
So, I made a frame with input text fields like "name", "e-mail" and "message". I added a button at the bottom with this script:
on(release) {
getURL("signGuestbook.asp","","POST");
}
And voila! Yes, I can catch the input text fields in my ASP page and store them in my database.
But here's my problem...
I kind of made a "frame" design in flash. I have this main window that launches whaterver application you might click on, within the main app, by using MovieClip.loadMovie(). So I can't have getURL to load signGuestbook.asp in it's own browser window (_SELF). It would simply wreck my framed flash application when it's being replaced with the ASP page.
Right now I'm having getURL to launch signGuestbook.asp in a new browser window (_BLANK). But gee we all love to have pop-ups, don't we?
Is there a way to "silently" post variables to an ASP/PHP/CGI/whatever script page?
View Replies !
View Related
Sending Variables Using Post
Hi,
When using post or get to send variables to an asp page, what variables are passed to the asp page? For ex. If I have a main timeline and two movies and I am posting from one of the movies will all the variables get passed or just the ones included in the movie I am posting from.
Thanks for any help on understanding this.
Melanie
View Replies !
View Related
Help With Sending Variables By POST Or GET
I am trying to send variables using the POST method.
I want to catonate a variable containing a secret key so that you can only get to an area online through a Flash projector.
I can't get the POST or GET to work from Flash 5.
I want to avoid having to use Director to do this.
Does anyone have any suggestions?
View Replies !
View Related
Passing Post Variables
im trying to pass a variable to a PHP page to send out an email. there is no problem with sending using GET.
but, the information im sending is bigger then 256 characters, so i decided to use POST. However, my POST variables always get dropped, even when i started out with a variable containing 5 characters long value.
im open to any suggestions.
thanks
justin
View Replies !
View Related
LoadMovie From ASP With POST Variables
I've drawn a blank with the following problem - its probably something dumb that I have missed, as I am not a highly experienced scripter. If so I would be really gratful if someone more knowledgeable than me can help put me out of my misery...
Basically I want to load an image using an ASP link, and need to send over some variables to get the right one. This works just fine :
loadMovie('aspurl.asp?thevar='+_root.thevar,myMovi e)
where :
_root.thevar is a previously defined variable
but unfortunatley it is essential for my purposes that the ASP URL with variable does not appear in cache. To do this I have been advised to use the POST method instead.
So I just tried this instead, in various different forms :
loadMovie('aspurl.asp',myMovie,'POST')
also tried declaring a new local variable just before this.
>> But it doesn't work <<
What have I missed ? My ASP knowledge is limited - is something required on the ASP side perhaps ?
View Replies !
View Related
How To Post Variables To A Php File
How to post Variables
Hi I need to post Variables to a php file
but dont want to load a new window using get(); I no
loadVariables(); will get them with out loading a window
get(); opens a new window but can send the Variables??
Please can you help, I bet you all do this all the time.
thanks
Brian
have posted this befour but to no joy
View Replies !
View Related
[F8] GetURL Using POST With Variables
I'll make this as easy as I can to explain:
I am making a small product catalogue, and want to call to call an outside website the UPC of each product.
If I use something like
Set Variable: "upc" = "897441000115"
to find the product, how do I set up the getURL script so it will find this?
The product is currently being found via an html form, using the following:
Code:
<form action="http://www.website.com/location.asp" method="post">
<input name="upc" type="hidden" id="upc" value=897441000115>
</form>
but the company now wants the product form directly IN flash. it's just a simple "click on image, find it" form.
hope someone can help!
View Replies !
View Related
Flash POST Variables
I'm using
code: mySendVars.sendAndLoad("testmail.php", myLoadVars, "POST")
e.g. to send a "naam" LoadVars variable to my php script.
In the php script I would use something like this
PHP Code:
$naamvariabele = utf8_decode($_POST["naam"])
to receive this variable send by Flash through "POST". In this case: $_POST["naam"]
But noticed just now that this
PHP Code:
echo $_POST["naam"];
gives the same result as this
PHP Code:
echo $naam;
after Flash has send the LoadVars.naam variable
So if I use an input text field with the instance "naam" and send its value to php using Loadvars, php automatically creates a php variable with the same name? Is that correct?
If so, I could also use this
PHP Code:
$naam = utf8_decode($naam)
which indeed works just as well (just tested it)
Or is working with a POST-variabele like $_POST["naam"] still safer?
View Replies !
View Related
Can't POST Additional Variables
I have a flash mc set to POST to a php script, but for some crazy reason (I've been trying to figure it out for hours) I can't add any more variables to the POST.
I'm using the LoadVars->sendAndLoad, and I can't get any more variables to POST. Is there some limit that I'm not aware of, since I do have a lot of variables I'm trying to POST.
View Replies !
View Related
POST Shows Variables In URL
I am trying to create an exe file with a quiz, but when i use geturl with POST, the variables are shown in the URL.
I can't use loadvars because i want the page to be dynamic (PHP) and do certain things depending on their result.
Any idea how i can hide the variables as they're passed?
View Replies !
View Related
POST And Load Variables
Hi guys,
well I finally jumped into AS3 World as I was working with AS1 and 2 for few years ...
Of course I read some articles about migrating to AS3 and whatnot and here's my problem.
I'm doing a simple sendandload function but somehow my POST doesn't work. If I change the method to GET it works. I tryied to ignore Loader and used "navigateToURL" and the POST works aswell. But if I use "load()" it doesn't.
Thanks for help.
Attach Code
function sendandload():void
{
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.navigateToURL;
var variables:URLVariables = new URLVariables();
variables.filename = "image.jpg";
variables.user = "dfsdfsdf";
var request:URLRequest = new URLRequest( "post.php" );
request.method = URLRequestMethod.POST;
request.data = variables;
//navigateToURL(request, "_self");
var loader:URLLoader = new URLLoader();
loader.addEventListener( Event.COMPLETE, sendComplete );
loader.load(request);
}
View Replies !
View Related
Using GetURL With POST Variables
I need to send a variable (zipcode) to a coldfusion script and also load the cf page that displays the results (same script) in the browser window (_self)
is getURL the appropriate choice for this? (never done it this way before).
if so, does using POST in a getURL just grab any variables on the _root? where does it get its variables?
thanks!
View Replies !
View Related
Post URL Variables Through FileUploader
I'm working on a file uploader that needs to pass a few variables to the php that will post. I've seen how the var posts work if it's a form, but this one's a little tricky. Here's the uplaod fiunction I'm got so far:
Code:
var allTypes:Array = new Array();
allTypes.push();
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
upload.onRelease = function()
{
fileRef.upload("upload.php?ID=100");
}
How could i make the "ID" section the URL variable? Any help would be absolutely amazing!
View Replies !
View Related
How To Get Post Variables Into Flash ?
Here's a great example with my quesiton at the end !!! Thanks to everyone for viewing...
Quote:
Originally Posted by JRMillion
using the LoadVars() object is the newer and better way of doing this.
Code:
var sendInfo = new LoadVars();
//Load up all the variables you want to POST
sendInfo.myVar = "some string or something";
sendInfo.myOtherVar = "some other string or something";
sendInfo.myNumberVar = 22;
sendInfo.send("script.php", "_self","POST");
then you can access myVar, myOtherVar and myNumberVar as post variables in the file addressed by send()
Okay! NOW how do you get those post variables into a flash movie clip embedded within that page ????
View Replies !
View Related
Post Form And Variables To Php, Asp Or Cgi
I am trying to post to asp, php and cgi server's pages, but for some reason my actionscript only posts the form's values ignoring the hidden and manually declared variables.
form is at http://www.abogado.co.cr/test/form.fla
actionscript not working:
Code:
on (release) {
var doit:String = "done";
var intl:Number = 1;
var tt:String = "urltext";
getURL("http://www.codeave.com/html/post.asp", "_blank", "POST");
}
later down will need to add also a combobox within the form.. does someone knows how to post the selected option to the web server page from my movie?
View Replies !
View Related
Post Variables To Database
Hi,
I'm working on a login page in Flash. When the user types in username and password they hit a button to submit it to a database. That works fine. But I want them to be able to use the enter key aswell as the submit button.
The problem is that when using the enter key....no variables are being send to the data base.
This is what I'm using for the button:
on (release) {
getURL("loginProcess.jsp", "", "POST");
}
This is what I'm using for the enter key:
onClipEvent (keyDown) {
if (key.getCode() == key.ENTER) {
getURL("loginProcess.jsp", "", "POST");
}
}
So basically it is sending the same thing...but no variables gets send in the latter.
I would truly appreciate some help on this......
View Replies !
View Related
POST And Load Variables
Hi guys,
well I finally jumped into AS3 World as I was working with AS1 and 2 for few years ...
Of course I read some articles about migrating to AS3 and whatnot and here's my problem.
I'm doing a simple sendandload function but somehow my POST doesn't work. If I change the method to GET it works. I tryied to ignore Loader and used "navigateToURL" and the POST works aswell. But if I use "load()" it doesn't.
Here's the code:
Code:
function sendandload():void
{
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.navigateToURL;
var variables:URLVariables = new URLVariables();
variables.filename = "image.jpg";
variables.user = "dfsdfsdf";
var request:URLRequest = new URLRequest( "post.php" );
request.method = URLRequestMethod.POST;
request.data = variables;
//navigateToURL(request, "_self");
var loader:URLLoader = new URLLoader();
loader.addEventListener( Event.COMPLETE, sendComplete );
loader.load(request);
}
Thanks for help.
View Replies !
View Related
|