post

What is the best way to post data from web browser to server?

Hi, I want to know what is the best way to send data from web browser to server using post method. I've seen a practice where they wrap all the elements data in XML, convert it into Base64 string and then post it to the server (via Ajax or hidden field). this way will not work if the Javascript is disabled, any how if I ignored this. is ...

How do I return specific keys from the $_POST array?

I would like to check to see if there are any keys in $_POST that contain a string. The string will not be the full key, only part of the key. (ie. search string = "delRowID", $_POST key = "delRowID_16"). I have tried to use array_keys($_POST,"delRowID"), but it has never returned anything. CODE print_r($_POST); print_r(array_keys($_PO...

Stop $_POST from having the same value when I refresh

When a vote value is changed, the form POSTs the change, then refreshes the page. This is called on the top of the page upon load: if (isset($_POST['q'.$question_id])) { $user->updateQuestionVotes($question_id, $_POST['q'.$question_id]); } Why does it update every time I refresh after the first time? Do I need to unset i...

PHP: How to forward on $_FILES using cURL

Hi. I'm trying to use cURL to forward on a http request from a form in a web application I'm developing. Essentially I need to submit the same form twice on different servers, for the second server I'm adding some security measures to the post data. I can receive $_POST information on the second form perfectly fine, however I'm having m...

Wordpress - related posts by custom taxonomy problem

Hello, I'm trying to display related posts based on a custum taxonomy. I found a query at wordpress.org that kind of works. However the original post gets duplicated in the results multiple times. (words is the name of the custom taxonomy I use) What seems to happen is that the single post gets duplicated according to what amount showpo...

[JQUERY/PHP] Sending and using POST variables using jQuery.ajax()

Is it possible to access $_POST variables without appending all the form elements into the data attribute? Ajax call: $.ajax({ type: "POST", url: "ajax/user.php", data: {**data**}, success: this.saveUserResponse }); Accessing variables: if(isset($_POST['saveUser']) && $_POST['saveUser']){ $user = $...

jquery/ajax post() in a posted page

hi everybody, I have a page with a div, inside this div I load a page with a form with a select, I can get selected option by post() function but, how can I get at the same time selected option and full data option? I've tried to get full data with a post() in a click() function positioned directly on form page but it does not work, can...

window.open on load page (ASP.NET) using Method=POST

i need open pop up in asp.net using post Method and window.open to rezise te new windows. my code: Open the pop up: function mdpbch(URL) { child = window.open(URL, "passwd","dependent=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=600,height=475"); child.location.href = URL; if (chil...

Rails messing up with HTTP POST Params

Our app provides an API that people can use to submit URLs like this: curl -X POST http://app.local/resource -d'url=http://news.google.com/newshl=en&q=obama&um=1&ie=UTF-8&output=rss' Unfortunately, it seems that Rails messes up with this param. Any idea on how to fix this? See the log below : Processing ApplicationC...

Posting a form using AJAX

Hi everyone, do u have an idea of how to send my radio button name for myAjaxPostrequest.send(parameters); can parameters be like this: var answername=document.getElementById('option1').name; var parameters=answername; ? this code is for using ajax to post a form and my php page needs the name of the radiobutton clicked I tried...

Submit form with POST data in Android app

I've been searching the web for a way to do this for about a week now, and I just can't seem to figure it out. I'm trying to implement an app that my college can use to allow users to log in to various services on the campus with ease. The way it works currently is they go to an online portal, select which service they want, fill in the...

POST a form in an iframe.

I would like to POST a form in an iframe, generated like so: My JS loads an iframe inside the page, adds a form to the iframe and submits the form. What I would like to happen is the iframe to load the result of that request. So, I would effectively like to post a form and render the result inside the iframe, without touching the parent...

What are the data type limitations of the POST and GET HTML Form Methods?

What are the data type limitations of the POST and GET HTML Form Methods? Are you limited to passing only specific data types like--strings, integers, floats. ...

ASP.NET/HTML: Use ASP.NET's label text/value in HTML's input value

I have the following html codes (to be used in POST method): // from Default.aspx <input type="hidden" name="lblName" value="John" /> <input type="hidden" name="price" value="100.00" /> Is it possible to change the 'value' part by using the value/text ASP.NET label given below: //from Default.aspx.cs <asp:Label ID="lblName" runat="se...

POST body in Node.js and some asynchronous condition check.

I want to get request (POST) body from http.ServerRequest, but do so not straight when my request function is called, but only after some time (Redis query). I have a very simple example to illustrate: var http = require('http'), sys = require('sys'); http.createServer(function (req, res) { sys.puts("Got request"); req.pau...

Function to sanitize input values PHP

I use this: function safeClean($n) { $n = trim($n); if(get_magic_quotes_gpc()) { $n = stripslashes($n); } $n = mysql_escape_string($n); $n = htmlentities($n); return $n; } To prevent any type of MySQL injection or anything like that. Whenever I use it to wrap around $_POST like this: $username ...

jQuery DataTables: Problems with POST Server Side JSON output

Hello Everyone, I am trying to get my datatable to take a POST JSON output from my server. This is my client side code: <script> $(document).ready(function() { $('#example').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "http://localhost/staff/jobs/my_jobs", "fnServerData": f...

How to send image data with HttpSendRequest ?

I want to send an image using HttpSendRequest API. Basically I want to Post the request with some string parameters and after those params I need to send raw image data. So is it okay to creata a unsigned char buffer of lengh equal to size of strings plus image file size and then doing memcpy of strings and memcpy of image data? ...

Page doesn't post to the given URL

Hello All, I have the following HTML content. When i click the button, the page doesn't post to URL provided in action tag. The corresponding application is running, but still the page load of the CrossPage.aspx was not invoked. What could be the problem? <body> <form id="UploadForm" method="post" enctype="multipart/form-data" action=...

php, curl , php curl , multipart/form-data , upload picture redirect

I'm trying to upload some pictures using php cURL on a classified ad website .I think that I set all the parameters properly but I see that there is a kind of redirect after I post the picture . The issue is that the url where I'm getting redirected gives 404 error instead to return the html that it does when I make the post with a norma...