post

AJAX doesn't send POST query.

$(document).ready(function() { function ajaxselectrss(rssurlvar) { var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{...

In PHP, I need to make a POST request, but one of the variables must be a text file. How do I do it?

Here's what I need to do. In my PHP script, I need to make a POST request, but one of the arguments must be sent as a text file named data.txt. I already wrote a little script that will send the POST request and send the arguments. The server expects an argument that's an array with two elements, arg0 and arg1. arg0 is a regular string, ...

Protect website against PHP Curl post method?

Ok, let's suppose we have a form which allows people to post their comments. As you know, "bad people" can spam me with help of PHP Curl easily. How can I protect my website against that not including captcha? Thank you. ...

Enumerate the properties of an AS3 object that may or may not be dynamic

In order to send a POST request I need to enumerate all properties of a given object. This object may or may not be dynamic. I'm looking for the most elegant solution. This is what I've got so far: function createURLVariables(params:Object):URLVariables { // Workaround: Flash Player performs a GET if no params are passed...

Getting paginated pages information from a Wordpress post

I'm seperating long posts using <!--nextpage--> but need to output user comments only on the last 'page' of a post. I can't find a way of counting the number of paginated pages and then outputting if page == last page. Any help is appreciated ...

Calling servlet post from jsf in different war

Hi, I want to call a Servlet which exists in a different war from my war. When user clicks a button we need to call the post method of the servlet. To implement this I did see an existing example which is slightly different but works in that case. I am using jsf, so in the jsp there is a h:form with another html form inside of it. Below...

Java: Google App Engine "HTTP method POST is not supported by this URL" error

I just started playing with Google App Engine and Java. I've used Servlets in the past and I understand how they work. I'm trying to make a servlet to POST to, but it's not going over very well. Here's my Servlet: public class CreateUser extends HttpServlet { private static final long serialVersionUID = 1L; @Override prote...

jQuery: ajax POST with html entities

Helloes. I've been sending forms with jQuery ajax & $(this).serialize to php & database and it has worked perfectly. Now I have situation where I can't use serialized form but generate a string from different input fields instead and the problem is that it appears to lose some URL entities in the process. for example "&phone=+3581234567...

What's the best way to submit a form to a form script on another site?

I am working on a basic HTML page that requires the user to send details to a script located on a third-party website. What I require is for the user to fill out a form on my web page, and have that information submitted to another third-party form. I do not wish to return anything to the user, other than whether the submission was succ...

Post and jquery elements

Hi all, I have a form with some different input elements. One of these is a checkbox array. Adding another checkbox to the array using Jquery, without reloading the page I cannot see my checked checkbox on $_POST? Is there any way to add extra input fields with values, and then catching these in a $_POST? Thanks in advance ...

PHP will echo $_POST data, but won't let me store it

Okay, weird problem. I have the following php code: <?php $identifier = $_POST['DEPT']; function displaydata(){ return $identifier; } ?> HTML CODE HERE <?php echo displaydata(); ?> This results in a blank page. However, when I replace function displaydata(){ return $identifier; } with function displaydata(){ return $_P...

How would I authenticate and make requests from an iPhone app to a Django backend to get around CSRF?

Hi, I'm working with an iPhone developer who does not have any Django experience, and I am relatively new to Django. I've built an existing Django app with a web interface that allows a user to log in and add books from our database to his personal library. We are trying to build an iPhone application that allows a user to authenticate ...

Setting POST variable without using form

Is there a way to set a $_POST['var'] without using form related field (no type='hidden') and using only PHP. Something like $_POST['name'] = "Denniss"; Is there a way to do this? EDIT: Someone asked me for some elaboration on this. So for example, I have page with a form on it, The form looks something like this <form method='post'...

jquery and post

Hi, why i don't get data from jQuery? Variables POST always empty <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt; <script> $(document).ready(function(){ $("form#submit").submit(function() { var fname = $('#fname').attr('value'); var lname = $('#lname').attr('value'...

Problem reading request body in servlet.

I'am writing a HTTP proxy that is part of a test/verification system. The proxy filters all requests coming from the client device and directs them towards various systems under test. The proxy is implemented as a servlet where each request is forwarded to the target system, it handles both GET and POST. Somtimes the response from the t...

How to POST form-like image data from java

Hey, I've tried researching how to POST data from java, and nothing seems to do what I want to do. Basically, theres a form for uploading an image to a server, and what I want to do is post an image to the same server - but from java. It also needs to have the right parameter name (whatever the form input's name is). I would also want to...

Two POSTs When Using jQuery

I am using the jQuery UI Tabs to display a number of forms (each tab can contain more than one form). When I switch between tabs, I am attempting to do POST of the tab's forms using AJAX calls. Here is the jQuery for what I am doing. select: function (event, ui) { var tab_index = $('#tabs').tabs('option', 'selected'); v...

c#.net post then write to sql db

Hi, I am new to c#/.net and just switched over to it from classic asp(yesterday). I am trying something very basic to begin with. I have a static form with about 20 questions (texts/textarea/checkbox/dropdown/radio) and it posts to a post page with a submit button. I need the post page to gather the answered questions and write them to...

jQuery post from ASP.NET web page (WebMatrix)

Hi everyone! I'm trying to submit form data with jQuery. I'm using ASP.NET WebMatrix. In a .cshtml file I have @{ // other code if(IsPost) { var item = new Item(); item.Title = Request.Form["title"]; item.Description = Request.Form["description"]; // aditional code here } } <script type...

Included PHP scripts can't access $_POST when output buffering?

I have an HTML form POSTing to the following index.php: <?php require_once("/home/full/path/to/included/file.php"); ?> And in file.php, I am trying to access $_POST: ob_start(); session_start(); var_dump($_POST); $contents = ob_get_contents(); ob_end_clean(); echo $contents; But var_dump($_POST) returns an empty array. Moving the ...