get

How can I do a sort and search using both GET and POST variables?

I am currently using column header's as links that when clicked will sort the results by the column name by adding a get variable to the url. Here is an example: <a href=" <?php // Sorts by order id. If already sorted by order id, then it will change the link to sort descending if(!isset($_GET['sortby']) || $_GET['sortby'] != 'ord...

Static fields question

im trying to understand the get and set properties for fields, and run in to this issue, can somone explaine to me why i had to make the int X field Static to make this work? using System; namespace ConsoleApplication1 { class Program { public static int X = 30; public static void Main() { va...

How to get the city from a Canadian zip code?

Hi, Do you have any experience with obtaining the City from a Canadian zip code? Is there a free web service to obtain city name by passing a Canadian zip code or can a regular expression be useful? Any ideas? Thanks! ...

PHP: transfer a large array between two sites

I'm trying to transfer a large array between two sites in PHP. I'm the admin in both. The array is created on one site, and after its creation I wish to automatically redirect the user to the other site, and pass the processed array along. I cannot use the SESSION superglobal, as it is limited to a specific domain. GET is not suitable...

How do we send data via GET method?

I am creating a HTTPS connection and setting the request property as GET: _httpsConnection = (HttpsConnection) Connector.open(URL, Connector.READ_WRITE); _httpsConnection.setRequestMethod(HttpsConnection.GET); But how do I send the GET parameters? Do I set the request property like this: _httpsConnection.setRequestProperty("method", ...

Django makes strange multiple GET calls on admin-site

My Django-Project is making some strange faned-out GET calls when opening on model from the admin-site and i have no idea where this comes from. I will try to provide as much information possible. Imagine this model called 'Rating', which holds a reference i.e. foreign key to 'Item', 'Usecase' and 'Rater'. So the Item can be rated under...

Best way to return search info from a database in php

So I have a form for people to fill out, which is below... Once they fill that form out, how can I query it and return the information from my database? <form name="form" method="get" action="agents.php"> <table> <tr> <td width = "20%">Last Name: </td> <td><input type="text" name="LASTNAME" size="20"/> ...

How can i get some part of html using XPath?

I need to get some part of html pages using php XPath query (sorry im new to XPath). example html page <html><head>blah lines</head><body> <div id="mytable"> <table><tr><td>table cell value</td></tr></table> </div> <body><html> is there any way to get div contents of above example along with html tags using XPath ...

How do I read a unicode url with PHP?

I have a unicode url: \test.php?sText=Московский I would like to use the $_Get function to work with the value of sText. The code I have for test.php is: <?php $sVar = $_GET['sText']; echo "Variable = $sVar"; ?> Problem is that the above is coming bach as: Variable = ?????????? What do I need to do? ...

Strange issue about # in url

http://localhost/test/editformquestions.php#?formid=1 And http://localhost/test/editformquestions.php?formid=1 I failed to retrieve $_GET['formid'] in the first one,why? The content of test/editformquestions.php is simply: <?php echo $_GET['formid']; ?> ...

GET vs POST in AJAX?

Why are there GET and POST requests in AJAX as it does not affect page URL anyway? What difference does it make by passing sensitive data over GET in AJAX as the data is not getting reflected to page URL? ...

HTTP GET Request, ASP - I'm lost!

Hi, Using VBScript with ASP I am trying to set up an HTTP GET Request which will visit a page which in turn generates a line of ASCII (non-HTML). I then want to extrapolate that ASCII line which will have 4 values delimited by semicolons back into 4 variables in my original ASP page so that I can take those values and do something with ...

PHP GET variable array injection

I've recently learned that it's possible to inject arrays into PHP GET variables to perform code execution? .php?a[]=asd&a[]=asdasd&b[]=$a That was the example I was given. I have no idea how it works and was wondering if this is even possible? ...

Get all the dates in a week of the selected date in jquery date picker?

I am creating a task list with number of hours worked to be entered against each task along each day of the week. So if a user clicks on a particular week dates then I need to get all the days' dates into hidden fields. Then I will use them to identify the which hours entry is against which date and insert them into the database. So for ...

Getting rid of extensions in variables (CMD)

CMD Q: I want to remove the extension of a filename. It is actually a complete path, like C:/Me/My/Path/filename.xxxx i know that the extension has 4 chars, like shown in example above. How can i get rid of the extension? Thanks. ...

Wordpress query post get Image unless blank

Hi I am creating a wordpress custom page theme, I have included the code. Is there a way to dynamically add the list items. In the code I grab each image related to its post with screenshot1 screenshot2 so on... This all currently works. My problem is at the current moment if I upload 2 screen shots 3 list items will show up and the thi...

Encrypting Querystring and Decrypting it in PHP

I have the following Encryption Classs in php define(ENCRYPTION_KEY,"abcdegef"); define(INITIALIZATION_VECTOR,mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_DES, MCRYPT_MODE_ECB), MCRYPT_RAND)); function EncryptString($input) { $encrypted_string = mcrypt_encrypt(MCRYPT_DES, ENCRYPTION_KEY, $input, MCRYPT_MODE_CBC, INITIALIZATION_VECTOR...

To clone or not to clone

I wrote a Scale9Bitmap class in AS3 and it requires the dev to set the BitmapData and a Rectangle for the scale9Grid. I'm wondered what is customary for the public get functions of both. Do I return a clone of each to make it free of hanging references, but not as memory-friendly? or do I leave that up to the dev and return the original ...

PHP: Set Varible to Get Value

I am creating a game web site using PHP and I want to just use one page for the game rather than have a bunch. I want to have the info entered like this: `?swf=[path to .swf]&name=[name of game]&description=[Description of Game]&instruction=[Instructions for game]`` The problem is that if there is no data entered in the URL it returns ...

Code for jQuery: GET into SPAN html?

$("#ShowRating").html($.get(url)); This is not working, in fact firebug doesn't even show any headers... what am I doing wrong here? ...