get

Why would you ever use $_GET in PHP?

I haven't officially started learning PHP just skimming through a couple tutorials and I have a question. Why would some one choose to use Get vs Post? Why would you ever want the data shown in the url bar? I understand post is used for passwords and important info but I don't understand why you would use get instead of just post all the...

jQuery $.get (async) big file blocks browser

I am doing a jQuery $.get to a html file, and in the success function I filter on a select block and take the options apart, rendering the text of the selects as paragraphs in divs that I append in my markup. Getting and rendering the selects takes a while (there are about 8000) but I was expecting the div's to show up one by one and let...

Secuity considerations when including files

Hello I am preparing to setup a request routing system in php based on the $_GET array. For example, for the url ?r=login I'd use include myfiles/".$_GET['r'].".php"; Which would point automatically to myfiles/login.php I know I need to sanitise the get input, but I'm concerned as it is possible to maliciously redirect the include. Ca...

define get or set in c#

hi friends i have problem with using get or set in class in c# when i use get or set in gives error(invalid token { in class) pls, see below code,i have this problem in it static int abcd { get { return _abcd; } } thanx this is the complete code,i dont have this problem with any of your codes ...

determine whether checkbox is checked php $_GET

Hi, I just want to have php determines whether a checkbox is checked, but I am running into a problem of getting the right return. Help please. My html code <label> <input name="Language" type="checkbox" id="aa" checked="checked" /> One</label> <label> <input name="Language" type="checkbox" id="bb" />Two</label...

Problem with keeping selected value in form after reloading page

Hey! I'm trying to populate a second dropdown in a dynamic way based on a previs selected dropdown. However, I've managed to write get the page to reload when I choose anything in the dropdownbox but the chosen value isnt passed after reloading. I have register_globals turned off (and prefer to) and i'm using the GET function to submit ...

get set property as a bool[] return

This is a very basic question. void Output(int output); -> this enables one single output bool[] Outputs { get; set; } -> This enables multiple output. I need the implementation of this. This is an API declared as a interface. In my class I need to use it. i studied this http://msdn.microsoft.com/en-us/library/87d83y5b%28VS.80%29....

HTML5 Audio Player makes multiple GET requests when loading. Why?

I have been working on a jquery plugin that uses a HTML5 audio player () to play back mp3's. I noticed that in various browsers multiple GET requests were made for the same MP3 file when the audio player was loaded. I created a simple standalone HTML file to test this out. <html> <head></head> <body> <audio controls src="http://lo...

Make Django Admin remember my parameters after posting

Hi! I have a problems thats been bugging me for a while. I want to use dates in django admin to view entries between certain dates. To do this I have customized my changelist.html for this model and put a form in there. When posted I override the queryset method like this def queryset(self, request): qs = super(ModelAdmin, self).q...

How to grab URL parameters using PHP?

I'm trying to grab each URL parameter and display them from first to last, but I want to be able to display any of the parameters anywhere on the page. How can I do this? What do I have to add or modify on my script? Here is an example of a URL value. http://www.localhost.com/topics/index.php?cat=3&amp;sub1=sub-1&amp;sub2=sub-2&amp;su...

Logout: GET or POST?

This question is not about when to use GET or POST in general; it is about which is the recommended one for handling logging out of a web application. I have found plenty of information on the differences between GET and POST in the general sense, but I did not find a definite answer for this particular scenario. As a pragmatist, I'm in...

PHP function to check if 2 variables are empty

I have an index page, I want it to include a page called splash.php and not display.php when a user lands on index.php, but once a user does something (sets a variable) ie if a user searches (variable "query") i want it to include display.php and not include splash.php What is wrong with this code? function hasGet() { return !empty...

my GET variable is being escaped?

I'm really confused here, can someone explain this to me? request: http://example.com/test.php?var=String's $a = $_GET["var"]; $b = "String's"; echo $a . "<br/>"; echo $b . "<br/>"; $output = mysql_real_escape_string($a); $output = mysql_real_escape_string($b); echo "<hr/>"; echo $a . "<br/>"; echo $b . "<br/>"; result: String\'...

Spring MVC @PathVariable getting truncated

I have a controller that provides RESTful access to information: @RequestMapping(method = RequestMethod.GET, value = Routes.BLAH_GET + "/{blahName}") public ModelAndView getBlah(@PathVariable String blahName, HttpServletRequest request, HttpServletResponse response) { The problem I am experiencing is that i...

Correct use of C# properties

private List<Date> _dates; public List<Date> Dates { get { return _dates; } set { _dates = value; } } OR public List<Date> Dates { get; set; } I have always used the former, is that incorrect or bad practice? It never occurred to me that I could just use the second option. I do like having my encapsulate...

jQuery - find not a function?

Hi all, could someone please explain why the following code is throwing an error? // JavaScript Document $(document).ready(function(){ $(".port-box").css("display", "none"); $('ul#portfolio li a').bind('click', function(){ var con_id = $(this).attr("id"); if( con_id.length !== 0 ) { $.get('./act_web_d...

How to get images from gallery and display them to the screen in android sdk

I would like to know how to get a pre-saved image from the gallery and then display it onto the screen. Any tutorials/helpful links and info would be appreciated. If there is anything you would like me to explain more, please ask. ...

Python Web Crawlers and "getting" html source code

So my brother wanted me to write a web crawler in Python (self-taught) and I know C++, Java, and a bit of html. I'm using version 2.7 and reading the python library, but I have a few problems 1. httplib.HTTPConnection and request concept to me is new and I don't understand if it downloads an html script like cookie or an instance. If y...

AS3 get/set vs. reassigning the value

What's the purpose of getting/setting values when you can just reassign the value? Is it just because you can get/set private variables? ...

jQuery GET Not Working

To preface this, let me says that I'm.. 'newish' to jQuery. I have the concept and most of the usage downpat, but I'm not perfect with all these brackets and functions yet. Hence why I'm probably making an amateur mistake here. I am using the following code to submit some data, move to the next section of the page and then attempting to...