post

Prevent Back button from showing POST confirmation alert

I have an application that supplies long list of parameters to a web page, so I have to use POST instead of GET. The problem is that when page gets displayed and user clicks the Back button, Firefox shows up a warning: To display this page, Firefox must send information that will repeat any action (such as a search or order confirma...

How to access POST data in PHP?

Hello, I need to write PHP page which would accept XML document sent over POST request. Request itself looks like this: POST /mypage.php HTTP/1.1 Host: myhost.com Content-Type: application/xml Content-Length: ... <?xml version="1.0" encoding="utf-8"?> <data> ... </data> This is not data from some HTML form, just plain XML document....

Post newline/carriage return as hidden field value

I need to post multi-line data via a hidden field. The data will be viewed in a textarea after post. How can I post a newline/carriage return in the html form? I've tried \r\n but that just posts the actual "\r\n" data <input type="hidden" name="multiline_data" value="line one\r\nline two" /> Is there a way to do this? ...

Passing POST data from one web page to another with PHP

Searching did not find a similar question, so: How can POST data used by PHP to generate one page be passed from that page to another PHP generated page? I have: A form on page 1 which sends data to a PHP script via POST. Page 2 is generated by that script and shows one or more graphs generated by an external program using the entrie...

POST Request (Javascript)

How do you make a simple POST request in Javascript without using a forms and without posting back? ...

How to sign in to a service using PHP

I want to sign in to a service (site) using PHP (without using its API) If the service login was with a and the method is 'GET', I would use Service.com/signin.php?username=xxxx&password=xxxx Now, the has a POST method how can I do so?? Thanks!! ...

jQuery callback not being called

I'm using the .post AJAX method of jQuery: // completion toggling $('.item input').click(function() { $.post('complete.php', {item: this.id}, function() { $(this).parent().fadeOut('slow'); }); }); What am I doing wrong here? The AJAX works as the record is updated but the callback event never happens. No errors in Fire...

Invoking a POST to an external site with C# (httpwebrequest)

This is driving me nuts and I can't figure out where I am dropping the ball. I've followed a few examples found via the googlemonsta to no avail. Any pointer to where I goofed would be greatly apperciated. var writer = new StringWriter(); param = "location=" + Server.UrlEncode(param); byte[] paramStream = Encodin...

Programmatically submitting a form in Python?

Just started playing with Google App Engine & Python (as an excuse ;)). How do I correctly submit a form like this <form action="https://www.moneybookers.com/app/payment.pl" method="post" target="_blank"> <input type="hidden" name="pay_to_email" value="[email protected]"> <input type="hidden" name="status_url" <!-- etc....

Posting variables in PHP

How do I post a variable in PHP without using a form, and accessing the variable from the next page. What I am really trying to do though, is post a variable like this: $username = "Sam"; $_POST[$username]; and then I am trying to access it from a page that I meta refresh to. Any ideas? ...

Child records not posting on ASP.NET MVC form

I have two tables, Author and Book, where an author can have many books. I've got an edit view set up as "System.Web.Mvc.ViewPage(of MyDatabase.Author)". The form is set up to show the Author and all his books, with the ability to edit book information: <% Using Html.BeginForm()%> <%=Model.author_name%> <br/> <% For Each item In Model.B...

ASP.NET MVC using UpdateModel to post child records

Continuing from this question, I've got a form with all the Vehicles listed for a Person, the vehicle fields are editable, and they are now successfully posting back to my Save action. Now I'd like to use UpdateModel to save the data, but I'm not sure how to construct it. Here's my Save action right now: <ActionName("Edit"), AcceptVerb...

How to create a form in SharePoint that modifies query string

My request is simple. i want to put a form (a text field let's say) on a sharepoint page, with a submit button. when i submit. I want the URL to be reposted with the s="textfromtextfield" say i was on a url http://site/site.aspx?p=x clicking submit will take me to: http://site/site.aspx?p=x&amp;s="textfromtextfield" ...

Tips for optimising Database and POST request performance

I am developing an application which involves multiple user interactivity in real time. It basically involves lots of AJAX POST/GET requests from each user to the server - which in turn translates to database reads and writes. The real time result returned from the server is used to update the client side front end. I know optimisation ...

post and get with same method signature

In my controller I have two actions called "Friends". The one that executes depends on whether or not it's a "get" versus a "post". So my code snippets look something like this: // Get: [AcceptVerbs(HttpVerbs.Get)] public ActionResult Friends() { // do some stuff return View(); } // Post: [AcceptVerbs(HttpVerbs.Post)] public A...

How to get URL Parameters from asp.net / jQuery.ajax POST?

Hi friends, I am trying to figure out how to get the parameters that are passed in the URL from a jquery plugin that I am using. Basically, I'm sending a POST ajax request to my web service and trying to use the URL parameters. But, they are always returned as nothing. I"m assuming this has to do with the fact that I'm in a POST. Can...

Asp.Net SQL Refresh page duplicate inserts?

I have a *.aspx page that contains a text box and a button. When the user enters information in to the textbox and clicks post, it inserts the data into my sql database. The issue is, that if the user hits refresh, it will keep inserting the same data into the database. I am pretty sure the whole "click" method is called, not just the in...

POSTing an arbitrary number of records from an HTML form

Hi I'm making a web page in which I have a list of products, along with a field next to each product in which a customer is meant to enter the quantity they want to order. The list of products is generated from a database and therefore the number of products isn't known. Is there a way of POSTing the quantity of each product ordered alo...

is this at least mildly secure php code?

I have a BUNCH of $_POST variables being sent in via a long form and instead of hard coding each one with a mysql_escape_string() is it ok for me to do the following? I don't know if this is actually safe and/or viable code. foreach ($_POST as &$post_item){ $post_item = mysql_escape_string($post_item); } I'm fairly certain that be...

How do I make an application/xml POST with ASP.NET?

I need to make a little handler that takes some querystring data and formulates a post to the BaseCamp API with it. Problem is I am not exactly sure how this is done, how to I specify which URL it is going to, and where to I put the XML that I build (I have the XML built already). And then how to I 'press GO' ? ...