post

Ajax(jQuery) strange file post problem

Hello, I have a problem posting file via ajax jQuery function. I have something like this: $('#my_form').submit(function() { var serialized = $(this).formSerialize(); var sUrl = "xxx"; $.ajax({ url: sUrl, type: "POST", data: serialized, success: function(data) { ...

PHP show image if post result equals

I have a form that posts to a page. I want to display an image if the value of the item posted equals "paypal". I need to write something that says; if $_POST['method'] equals "paypal" then show paypal.gif if $_POST['method'] equals "mastercard" then show mastercard.gif I hope I made a bit of sense, new to php trying to learn the ...

Posting XML via curl (command-line) without using key/value pairs

Consider a PHP script that outputs all POST data, as follows: <?php var_dump($_POST); ?> The script is located at http://example.com/foo.php. Now, I want to post XML data to it (without using key/value pairs) using command line curl. I have tried many variations of the following: curl -H "Content-type: text/xml; charset=utf-8" --dat...

jquery: is there a fail handler for $.post in Jquery?

When $.post succeeds, there is a success handler for it. What happens if it fails? Is there a similar handler that we can use for this case, so that we can inform the user that something is not happening right? ...

Silverlight caching HTTP POST which results in a 404

Situation: I am developing a Silverlight-Application which needs Component based on a local HTTP Listener. The HTTP-Listener can't be 'required' to be installed and running when the Application starts, so the Application does the following: Handshake via HTTP POST If Connection failed open a Click-Once Setup to install the component....

Get info about Http Post field order

Is it possible to get information about post field order in ASP.NET? I need to know whether some field was the last one or not. I know I can do it through Request.InputStream, but I’m looking for a more high level solution without manually stream parsing. Generally I’m doing testing of http post sent by my application and there is no ...

POST to a webpage from C# app

I've been looking/asking around and can't seem to figure this one out. I have a C# application and need to be able to gather some data in the app, pop open a web browser and POST some data to it. I can POST to the site from within the app fine and I can obviously pop open IE to a certain link but I can't do both. I can't POST to that li...

jQuery - now: Creating an object and storing values in it to pass to an AJAX call

I have an array: myarr = []; I'm filling it with some values: myarray['name'] = "Me!"; Now I want to transform that array into a set of Key => Value pairs. I though jQuery would do it automatically, but it doesn't seem to. $.ajax ({ type: "POST", dataType: "text", url: "myurl", data: myarr }); Is there a way to d...

SimpleXMLElement (PHP) throwing error on XML root attributes

I am working on a project that will take XML data submitted through a textarea input in a form then extract the data and throw it into a database. I am getting errors about the attribute in the root field of my XML (it is the same schema each time, but with different values). If i remove these attributes it works fine, but I don't want t...

Should HTTP POST be discouraged?

Quoting from the CouchDB documentation: It is recommended that you avoid POST when possible, because proxies and other network intermediaries will occasionally resend POST requests, which can result in duplicate document creation. To my understanding, this should not be happening on the protocol level (a confused user armed with a ...

Form submission and hyperlinks using GET and POST

I have a search resource, the user can perform searches by filling out a form and submitting it, the create action is called, the Search is saved, the show action is called, and the results are displayed. This all happens with the default POST, and all works fine. The user may want to save his search in the saved_search table (i don't u...

How to call a script that expects $_POST from inside a function

My script.php accepts $_POST input and echos a string. $theinput = $_POST['theinput']; $output = //some processing; echo $output; I need the same code in another function in a different file second.php and don't want to repeat the code. But the first script script.php expects input as $_POST. My input in the function is not $_POST ju...

How do I make a progress bar using Term::ProgressBar with LWP::UserAgent's post method?

#!/usr/bin/perl use LWP::UserAgent; use HTTP::Request::Common; use HTML::TreeBuilder; use Cwd 'realpath'; use warnings; use strict; my $ua = LWP::UserAgent->new(); my $response = $ua->request( POST 'http://mydomain.com/upload.php', 'Content-Type' => 'multipart/form-data', 'Content' => [...

PHP Redirection with Post Parameters

Hello, I have a webpage. This webpage redirects the user to another webpage, more or less the following way: <form method="post" action="anotherpage.php" id="myform"> <?php foreach($_GET as $key => $value){ echo "<input type='hidden' name='{$key}' value='{$value}' />"; } ?> </form> <script> document.getElementById('m...

AJAX Post Not Sending Data?

I can't for the life of me figure out why this is happening. This is kind of a repost, so forgive me, but I have new data. I am running a javascript log out function called logOut() that has make a jQuery ajax call to a php script... function logOut(){ var data = new Object; data.log_out = true; $.ajax({ type: 'P...

Html POST and return the same form with the values

Hi, I'm learning web development, and I don't know how do this simple thing. I've a html form with "text", "radio" and "checkbox" controls, that POST the values to the server and it saves them, for example in a file. I save the POST in raw format: key=value&key=value&key=value&key=value and I'd like that when the user open the form ...

delphi idhttp post related question

hello All im new to delphi. and also almost new to programming world. i was made some simple post software which using idhttp module. but when execute it , it not correctly working. this simple program is check for my account status. if account login successfully it return some source code which include 'top.location =' in source,...

Empty POST from jQuery UI Dialog to PHP function with $.post

Hello, I am having hell of a time trying to figure this one out. Maybe someone can help me here or point me in the right direction. I have a jQuery UI dialog that pops up when user clicks on an image. The dialog displays a form with 2 drop down windows. "dept" and "group". Group drop down is disabled, until something is selected in the...

delphi post 'illegal access' error

hello all I'm making some simple Delphi software using the IdHttp module in Indy. I want to access this page by using IdHttp's post function to open this webpage. Firstly I have to log in, (at http://user.buddybuddy.co.kr/Login/Login.asp), so I logged in, but after I logged in to the webpage I can see another login page. But when I t...

Is Http POST limitless?

I heard that POST has no limit in data size it can be send by it, is that true or is there some really high limit? ...