post

How Can I Send File With POST Method From C# To Php File Which (php) Gets Files From HTML Form By $_FILES Function?

I asked same question previous day.but becouse of my limited english I cant explain it well So I decided to explain Step By Step First I have php file that gets data and file from HTML form and uploads file to specific directory by $_POST and $_FILES methods.. Second I have windos aplication (c#).User could drag and drop any file to...

What Is Wrong With Using GET To Remove Content?

I know it goes against the REST architecture but, from a pragmatic viewpoint, what is wrong about using GET request method to remove data from a database? Let's say I built an application that has an administration panel. In administration panel admins can remove items by accessing URIs like these: /admin-panel/items-controller/remove-...

ASP.net post and default page.

Scenario: I have a regular aspx page with a form. When someone clicks a button the form submitted via post like normal. HOWEVER. The page where the form resides is the default page(Default.aspx). So when someone goes to the site: http://site.com/ and submits the forms he gets redirected to http://site.com/default.aspx. I tried setting...

How to debug Django PayPal IPN?

I'm using this django app to implement PayPal IPN. I'm testing it using PayPal's IPN simulator, but it's telling me IPN delivery failed. HTTP error code 500: Internal Server Error So how can I debug this and see what's really going on? I've dug into code: @require_POST def ipn(request, item_check_callable=None): """ PayPal...

POST data not being received from iPhone

I've got an iPhone App that is supposed to send POST data to my server to register the device in a MySQL database so we can send notifications etc... to it. It sends it's unique identifier, device name, token, and a few other small things like passwords and usernames as a POST request to our server. The problem is that sometimes the serv...

Ajax GET requests to an ASP.NET Page Method?

A situation I ran across this week: we have a jQuery Ajax call that goes back to the server to get data $.ajax( { type: "POST", contentType: "application/json; charset=utf-8", url: fullMethodPath, data: data, dataType: "json", success: function(response) { successCallback(response); }, error: erro...

iPhone POST to PHP failing

I have this code here: NSString *post = [NSString stringWithFormat:@"deviceIdentifier=%@&deviceToken=%@",deviceIdentifier,deviceToken]; NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:NO]; NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]]; NSMutableURLRequest *request = [...

How do I send an array in an .ajax post using jQuery?

I have looped through a simple gathering data and pushing it into an array. I am then trying to send that array to a page method (.aspx). There is something about the array that it does not like I think. Here is my code: //packaging table data for submit to server $("#saveToDB").click(function() { var dataFo...

Delphi: problem with httpcli (ICS) post method

Hello I am using HttpCli component form ICS to POST a request. I use an example that comes with the component. It says: procedure TForm4.Button2Click(Sender: TObject); var Data : String; begin Data:='status=no'; HttpCli1.SendStream := TMemoryStream.Create; HttpCli1.SendStream.Write(Data[1], Length(Data)); HttpCli1.S...

jQuery, PHP, AJAX, "tu" variable beeing posted for no reason, shows in var_dump()

A jQuery AJAX request .post()s data to page.php, which creates $res and var_dump()s it. $res: $res = array(); foreach ($_REQUEST as $key => $value) { if($key){ $res[$key] = $value; } } var_dump($res): array(4) { ["text1"]=> string(6) "mattis" ["text2"]=> string(4) "test" ["tu"]=> string(32) "deb6adbbff4234b...

PHP - Snoopy POST request + maintain SESSION?

Using Snoopy I make a request, but it seems that a different SESSION is used for the POST? When I echo the results of the request the SESSION is set but after clicking any link the page returns to a non SESSION-set state. Currently i'm using v.little code to make the request $dashboard = new Snoopy; $dashboard->referer = "URL"; $dashb...

How to force browser to set charset in content-type http header

A simple HTML file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <form method="POST" action="test.jsp" accept-charset="utf-8" method="post" enctype="application/x-www-form-urlencoded" > <input type="text" name="P"/> ...

Excluding one category in Wordpress

I just started out using wordpress as a CMS. On the site I have 2 pages I want different posts to show on. So far I understand this small code to post only one particular category one a page (when put infront of the loop: <?php query_posts('cat=8&showposts=5');?> But what do I write when I need to exclude this category on my blog-page...

how do i get jQuery .post to work with wordpress/php?

hi i'm building something like a posts gallery and i want to do the following: 1. have thumbnail for each post 2. when a thumbnail is clicked, i want the new post to be loaded at a div at the top of the page w/o the posts gallery changing. to do that i want to pass the id of the clicked-on post to that div and then run the query_string t...

Pass a value from a text box using submit button and post method

I'm new to mvc, and I'm having trouble passing the value of a textbox to the controller method. I've got: in the aspx page: <form action="/Search" method="post" > <input type="submit" value="search" name="id" /> global.asax: routes.MapRoute( "Default", // Ro...

How to correct 404 error with post

System.Net.WebException: The remote server returned an error: (404) Not Found I have three website. also have a method called post. When I post a form to siteB from siteA. the method post working perfect. When I post from siteA to siteC with same method, it give me an error System.Net.WebException: The remote server returned an error: (4...

PHP form values after POST

I have a form on which I POST the data with PHP. When the data is send I want to show the new values. Doing this on textfields is easy, but how can I set the new values on the radioboxes. My default value is Male here. PHP if (isset($_POST['Submit'])) { update_user($_POST['name'], $_POST['sex']); // the update method } HTML <for...

HttpClient automatically retires before the response is received from server

Hi all, I'm come upon a wierd problem with java HttpClient library. Specifically the library automatically retries my request (POST requests) even before the response is received from the server. Moreover the weirder problem is that this only happens on specific hosts (machines). So the end result is if a post request succeeds, the...

php: Save the entire $_POST variable in the session

Is this valid: $_SESSION['pictures']['rateAlbum']['_POST'] = $_POST; I want to save all of the POST data in the session in one shot. edit: oh and what about the other way around: $_POST = $_SESSION['pictures']['rateAlbum']['_POST']; ...

php custom post variables

is there a way to create custom post variables when a user presses submit, like this: $_POST['var'] = 'hi'; ...