get

When do you use POST and when do you use GET?

From what I can gather, there are three categories - never use GET and use POST, never use POST and use GET, and it doesn't matter which one you use. Am I correct in assuming those three cases? If so, what are some examples from each case? ...

PHP: GET-data automatically being declared as variables

Take this code: <?php if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; } if ($action) { echo $action; } else { echo 'No variable'; } ?> And then access the file with ?action=test Is there any way of preventing $action from automatically being declared by the GET? Other than of course...

HTML: POST for images?

Hello, I am working on a web-application in which dynamically-created images are used to display information. This data is currently sent to the images using a GET query-string but with more complex images and data I am worried about running into problems with the url character limit. I could simply pass the record ID to the image and h...

Have you noticed stray hits to your web pages that have no parameters?

We have a web application that passes parameters in the url along the lines of this: www.example.com/ViewCustomer?customer=3945 Reasonably often, we will see attempts to access just: www.example.com/ViewCustomer Or system logs this as invalid and sends back a "An error has occurred, contact support with trace number XXX" type page....

HTTP GET request in Javascript?

I need to do an HTTP GET request in JS, what's the best way to do that? Thanks EDIT: I need to do this in a Mac OS X dashcode widget ...

How to post a page from asp.net to classic ASP

I'd like to post some form variables into a classic ASP page. I don't want to have to alter the classic ASP pages, because of the amount of work that would need to be done, and the amount of pages that consume them. The classic ASP page expects form variables Username and Userpassword to be submitted to them. username = Request.Form("U...

PHP Automatically "GET" Variables

I am desiging a new website for my company and I am trying to implement switch navigation which is what I have used on all my sites in the past. <?php switch($x) { default: include("inc/main.php"); break; case "products": include("inc/products.php"); break; } ?> For some reason when I go to index.php?x=products nothing happens, it ...

HTTP URI GET limit

Is there a length limit of characters for an HTTP GET requests? ...

PHP $_GET parameter is not populated, even though URL has appropriate form

I'm working on a new Wordpress site that is exhibiting some strange behavior. I pass it a URL with GET parameters in it, and the $_GET parameter is not populated. I see in the $_SERVER parameter that the REQUEST_URI has the full URL there, completed with the ?var=value part, but no love in the $_GET variable. The URL is being redirect...

Use GET or POST for a search form

I have a couple search forms, 1 with ~50 fields and the other with ~100. Typically, as the HTML spec says, I do searches using the GET method as no data is changed. I haven't run into this problem yet, but I'm wondering if I will run out of URL space soon? The limit of Internet Explorer is 2083 characters. Other browsers, have a much hi...

Getting to the query string (GET request array) inside a web service in .NET

I'm looking to find a way to access the .net query string contained in the standard ASP.NET request object inside a web service. In other words if I set a SOAP web service to this url: http://localhost/service.asmx?id=2 Can I access the ID Get variable? ...

JMeter Tests and Non-Static GET/POST Parameters

What's the best strategy to use when writing JMeters tests against a web application where the values of certain query-string and post variables are going to change for each run. Quick, common, example You go to a Web Page Enter some information into a form Click Save Behind the scenes, a new record is entered in the database You want...

What happens when you make assignments to fields or properties of properties

Lets say you have a property like: Person person1; public Person Captin{ get{ return person1; } set{ person1 = value; } } public void SomeFunction(){ Captin.name = "Hook" } In this case if you set the name on the property we know that the new name of Hook will get applied to the underlying value ...

How to build query string with Javascript

Just wondering if there is anything built-in to Javascript that can take a Form and return the query parameters, eg: "var1=value&var2=value2&arr[]=foo&arr[]=bar..." I've been wondering this for years. ...

How can I do <form method="get"> in ASP.Net for a search form?

I have a search form in an app I'm currently developing, and I would like for it to be the equivalent of method="GET". Thus, when clicking the search button, the user goes to search.aspx?q=the+query+he+entered The reason I want this is simply bookmarkeable URLs, plus it feels cleaner to do it this way. I obviously don't want all the vie...

How to allow CodeIgniter GET parameters

I know that codeIgniter turns off GET parameters by default. But by having everything done in POST, don't you get annoyed by the re-send data requests if ever you press back after a form submission? It annoys me, but I'm not sure if I want to allow GET purely for this reason. Is it such a big security issue to allow GET parameters t...

GET vs POST in HTML forms

Possible Duplicate: When do you use POST and when do you use GET? When should an HTML form tag use a GET method and when should it use a POST method? ...

Keeping a variable around from post to get?

I have a class called myClass which defines post() and get() methods. From index.html, I have a form with an action that calls myClass.post() which grabs some data from the data base, sets a couple variables and sends the user to new.html. now, new.html has a form which calls myClass.get(). I want the get() method to know the value...

How to get information about used tables from processed query?

Hi, Previous programmer left me with "beautiful" piece of code and he kind of forgot to apply something to it. There is a query which selects several items from several tables. 6 Items can be chosen. It means 6 tables can be chosen, however there can be more tables - even 20 of them. I need to get that list of tables from processed que...

Persistent HTTP GET variables in PHP

Let's say I have some code like this if(isset($_GET['foo'])) //do something if(isset($_GET['bar'])) //do something else If a user is at example.com/?foo=abc and clicks on a link to set bar=xyz, I want to easily take them to example.com/?foo=abc&bar=xyz, rather than example.com/?bar=xyz. I can think of a few very messy ways to...