f



Must GET/POST Parameters Have Values? (And What is the Syntax for GET, If NOT)

Are GET and POST parameters required to have values, i.e. are either of 
these legal?

http://www.mydomain.com/index.php?this&that

http://www.mydomain.com/index.php?this=&that=

In my application, I have a GET/POST parameter that is significant just by 
its presence (it doesn't need a value), and rather than say this=1&that=1 I 
was wondering if it is legal to specify them without values.

Thanks, Dave. 



0
dta (455)
7/19/2006 1:10:46 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

2 Replies
659 Views

Similar Articles

[PageSpeed] 8

David T. Ashley wrote:

> Are GET and POST parameters required to have values, i.e. are either of
> these legal?
>
> http://www.mydomain.com/index.php?this&that
>
> http://www.mydomain.com/index.php?this=&that=
>
> In my application, I have a GET/POST parameter that is significant just by
> its presence (it doesn't need a value), and rather than say this=1&that=1 I
> was wondering if it is legal to specify them without values.
>
> Thanks, Dave.

yes thats ok, but they need an equals sign at the end still like in
your second example, i havent tried it without, also
empty($_GET['this']) this is fine if you simply want to see if it
doesnt have another value, i use stuff like this for links to member
logins, that way they can be returned back to the same page after a
successful login and ensure everything was there that was before.

Flamer.

0
die.spam (165)
7/19/2006 1:13:17 AM
I've used like your first example (no equals signs) with no problems
many times. All one must do to see if it is there is:

isset($_GET['this'])

I use this to get different pages from the same php script
-Blayde

David T. Ashley wrote:
> Are GET and POST parameters required to have values, i.e. are either of
> these legal?
>
> http://www.mydomain.com/index.php?this&that
>
> http://www.mydomain.com/index.php?this=&that=
>
> In my application, I have a GET/POST parameter that is significant just by
> its presence (it doesn't need a value), and rather than say this=1&that=1 I
> was wondering if it is legal to specify them without values.
> 
> Thanks, Dave.

0
da.blayde (6)
7/19/2006 6:44:48 PM
Reply:

Similar Artilces:

get a value in the servlet with get, but null with post
Hi, I am getting a value for a hidden field in my servlet when the method of the form is GET. But when I change it to POST, I get a null value for the same field, all things remaining the same. Does anybody have any idea why this could be happening? Thanks, Shiv "Shiv" <ss_panda@hotmail.com> wrote in message > Does anybody have any idea why this could be happening? Not without seeing some code... -- Wendy in Chandler, AZ try to find article named "High-Level Network Programming ", here is one part: ".... Consider the following HTML form: ...

How to get value of an input box into php? is it possible? syntax?
Hello, My goal is to make an input check box that saves an input text to a cookie when checked and destroys the cookie when unchecked. I figured i could use the onclick method of the input box to execute the PHP function setcookie, but how do I get the value from the input text? Testing with the window.alert function, inputtextName.value doesn't work in the PHP: <html> Your name: <input class="selectstyle" type="checkbox" name="savename" onclick='window.alert("savename.value")'><br> <input class="inputstyle2&quo...

Getting error while getting Google plus posts
Hi, I am using the following code to get the Google Plus posts, import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import com.google.api.client.http.HttpTransport; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.JsonFactory; import com.google.api.client.json.gson.GsonFactory; import com.google.api.client.json.jackson.JacksonFactory; import com.google.api.services.plus.Plus; import com.google.api.services.plus.PlusScopes; import com.google.api.services.plus.model.Activity; import com.google.common.base.Preconditions; import com.google.common.io.Files; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.net.URI; import java.nio.charset.Charset; import java.security.PrivateKey; import java.text.*; import java.util.Properties; import redegg.redcals.update.View; public class Test { /** E-mail address of the service account. */ private static final String SERVICE_ACCOUNT_EMAIL = "801283043278- ek42r1e5ulsvdremass1huh7rtcq16lp.apps.googleusercontent.com"; /** Global instance of the HTTP transport. */ private static final HttpTransport HTTP_TRANSPORT = new NetHttpTransport(); /** Global instance of the JSON factory. */ private static final JsonFactory JSON_FACTORY = new JacksonFactory(); private static Plus plus; public static void main(String[] args) { try { try { GoogleCrede...

how to get newline with gets?
Hello. I like the -nonewline option of puts, and wonder why there isn't a counter option in gets? The reason I need it is effectively I am doing this: set line [gets -withnewline stdin] if {[lindex $line end] eq "\r" } { # do something } if {[lindex $line end] eq "\n" } { # do something different } I guess without such an option I have to read byte-by-byte to achieve this, right? Thanks. On 5/11/11 1:21 PM, =E5=90=95=E9=9F=A6=E7=94=AB wrote: > Hello. I like the -nonewline option of puts, and wonder why there isn't= a > counter option in gets? > > The reason I need it is effectively I am doing this: > > set line [gets -withnewline stdin] > > if {[lindex $line end] eq "\r" } { # do something } > if {[lindex $line end] eq "\n" } { # do something different } > > I guess without such an option I have to read byte-by-byte to achieve t= his, > right? You could just do the gets and check the line termination configuration w= ith=20 fconfigure. Why does it matter? --=20 +------------------------------------------------------------------------= + | Gerald W. Lester, President, KNG Consulting LLC = | | Email: Gerald.Lester@kng-consulting.net = | +------------------------------------------------------------------------= + On 05/12/2011 02:27 AM, Gerald W. Lester wrote: > > You could just do the gets and check the line termina...

BaseHTTPServer
Hello, After experimenting for a while, I am still not able to find where the POST data is in the BaseHTTPRequestHandler class. I am trying to write a very simple HTTP server for a project of mine and I need to get the POST data. Certainly I am missing something, as it is a comon task. Thanks in advance, Vlad Vlad Dogaru wrote: > > After experimenting for a while, I am still not able to find where the > POST data is in the BaseHTTPRequestHandler class. I am trying to write > a very simple HTTP server for a project of mine and I need to get the > POST data. Certainly I am mi...

Roy Schestowitz The Liar Gets Pissy When His Posts Get Audited.
Roy Schestowitz the pathological liar doesn't like it when people point out that his subject lines often have nothing to do with the articles he provides links to. Here is an example of Roy Schestowitz the gym bunny getting pissy and actually admitting his subject line has nothing to do with the article. Unbelievable. And this fool considers himself an investigative journalist? He's more of a laughing stock. Read this thread, http://groups.google.com/group/comp.os.linux.advocacy/br owse_thread/thread/2bdb19118332e6e6/c31f075376b265b3? hl=en&lnk=raot#c31f075376b265b3 http://tinyurl.com/3r33s98 The meat of it is hear, Snit: "I thought Linux was the kernel... without an application layer. " Roy Schestowitz The Liar: "RTA. It's not what the headline says. " He ain't kidding. Karl Wojaczyk wrote this copyrighted missive and expects royalties: > -- More troll bile to follow. Stay tuned! ...

Get Relaxed and Get free Heritage passes ---Sign Up is must
Visit the link below: http://www.dpbolvw.net/click-2863058-10437698 To get Relaxed Visit the link: http://anujbatta.blogspot.com ...

When do default parameters get their values set?
I ran into an issue setting variables from a GUI module that imports a back end module. My approach was wrong obviously but what is the best way to set values in a back end module. #module name beTest.py cfg = { 'def' : 'blue'} def printDef(argT = cfg['def']): print argT #module name feTest import beTest beTest.cfg['def'] = "no red" beTest.printDef() This prints blue. I suppose because I am changing a local copy of cfg dictionary. What is the write approach here? Thanks Bill On 2014-12-08 14:10, bSneddon wr...

Getting values into running VRML from PHP
Hi ng, I've tried to find solution to interact with running VRML from PHP. No success :-( I saw here couple of questions about it but no clear answer or some unique solution. Could somebody provide an example? What I want to do? I have a VRML file which IS generated by PHP, and this wrl file shows stats about page visits/visitors... It is OK and when I reload it it will show new status for egg. if there is 4 visitors, it will show 4 lines in front of cube. But I want to have wrl running all the time, and with help of some timer to fetch new status from PHP script and...

How to get an parameter from a remote php script?
Okay im to stupid to figure this out. example: ?php on http://bi.com { $t = "http://foo.com/boo.php?action=1&test=2"; echo $t; } Now on foo.com the php script boo.php does something with this request.. So far i get it :) Now comes the problem. How I get the result from foo.com/boo.php into the $t ? Any expert out where may could help me find the way around this ? Markus wrote: > Okay im to stupid to figure this out. > > example: > ?php on http://bi.com > { > $t = "http://foo.com/boo.php?action=1&test=2"; > echo $t; > } > > Now ...

Get max value of int in php
Hi All, Is there any way by which I can get the maximum value of an integer in PHP? (Something like int.MAX_INT) Thanks, Nikhil -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 nikhil wrote: > Hi All, > > Is there any way by which I can get the maximum value of an integer in > PHP? > (Something like int.MAX_INT) > > Thanks, > Nikhil Hello, as far as I know you could use: PHP_INT_SIZE see http://www.php.net/manual/en/reserved.constants.php for more information also the comments below. regards, j.ke�ler -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux...

how to get values of a redirected a POST request ?
these are three files below : submit.html <html> <head> </head> <body> <form action="redirect.php" method="POST" > <input type="text" name="value" value="test" > <input type="submit" > </form> </body> </html> redirect.php <?php header("HTTP/1.1 303 See Other"); header("Location: post.php"); ?> post.php <html> <head> </head> <body> <?php if(isset($_REQUEST['value'])) { echo "the value is : <font c...

convert a GET to a POST before output to php
I have a Filemaker desktop application that sends a string of serialized addresses as a GET parameter to a google map (googlemap.php). There are some reasons I need to convert the GET to a POST, one of which is there are sometimes 200 separate addresses and in IE there is a limit. So I designed this local HTML page as a proxy of sorts to convert the GET to a POST before sending it to the googelmap.php page to display as addresses on google map. I copied a Javascript routine from the web that parses the addresses and assigns it to a variable (pgformproxy.js) . I'm not getting some output so can someone tell me how to debug this before posting it to php or if I'm going in the right direction? I don't know if I called the function right or if the page post is right. Thanks very much, Janis <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitonal.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>HTTP Proxy Convert Get to Post</title> <script type="text/javascript" src="pgformproxy.js"></script> </head> <body onload='addrList=document.getURLParam(addr)'> pgpost_url = file://localhost/Users/jlrough/Sites/workspace/soliant/googlemap.php"&...

Getting a file via http or evaluating a php file and getting its output
I need to somehow merge two separate web programs written in php together (from the user's perspective). This solution won't be perminant, I just need something done quickly. I was thinking of two different approches. One would be to download a processed version (modified so it will create validating html with the page it's being embeded in) of one of the programs with the other, then just use print to embed it in the page. I couldn't find out how to get a file via http here (http://us2.php.net/manual/en/index.php). Sorry if I missed this in the docs. The other would be t...

post or get message posting
Hi I have a form I need to post to with perl.The form is too big, but here is the key. It has no "type', as it's a message box input. How can I post to it? Thanks. <textarea class="ygta post-input-border" rows="10" cols="60" id="message"name="message" tabindex="3"></textarea> </label> </p> <br/> </td> </tr> <tr> RocketMan <rm@dontspamme.net> wrote: > I have a form I need to post to with perl...

My post dont get posted ?
Why dont my post get posted here ? - P Well I read it;-) I get the impression that the new Newsgroup interface still has 1 or 2 bugs. There has been at least one or two of my posts that I didn't get on this news reader, but were visible on other readers (along with the endless adverts to trainers etc.) so I guess it can't be all that bad. Regards Dave Robinson "Dave Robinson" <dave.robinson@somewhere.biz> wrote in message news:f7n7i0$ohc$1@fred.mathworks.com... > Well I read it;-) > > I get the impression that the new Newsgroup interface still has 1 or ...

Getting values in between the values of a vector?
Say I have a vector that's like this: [-6 -3 0 3 6] How can I get it get the number in between each of the two values to return something like: [-4.5 -1.5 1.5 4.5] Is there a built-in function that can do this? I'm asking because I'd like to avoid a loop if possible (but I'm thinking it's the only way). Thanks! "Brandon Rodriguez" <coasters2k@yahoo.com> wrote in message <gsfp69$19b$1@fred.mathworks.com>... > Say I have a vector that's like this: > > [-6 -3 0 3 6] > > How can I get it get the number in between each of the two v...

Need help to get the amplitude of a wave file ( need to get the highest value )
Recently I start to find a solution to my research about audio analyzing. I need to get the frequency level of a wave file and the amplitude. can any one help me ? dinuwan.adg@gmail.com wrote: > Recently I start to find a solution to my research about audio analyzing. I need to get the frequency level of a wave file and the amplitude. can any one help me ? > WHAT is your goal? On Tue, 2 Sep 2014 22:40:43 -0700 (PDT), dinuwan.adg@gmail.com wrote: Hi, >Recently I start to find a solution to my research about audio analyzing. I don't understand the meaning of...

how to get parameter value from dynamic select statement ?
Hi, running DB2 UDB 7.2 F.P 12 on WIndows Developers debug old application and need to get value passed to db2 by application I run db2cli trace and event monitor and both cases I get SELECT T1.* FROM UCIT.UPS_INVOIC MSG T1, UCIT. UPS_MSG_PRICEGRP T2, UCIT.UPS_PRICE_CUST_GRP T3 WHERE .T1.MSG_NUM = T2.MSG_NUM AND.T2.TYPE = 'I' AND.T2.GROUP_NAME = T3.GROUP_NA ME AND.T3.CUSTOMER_NUMBER = ? AND T1.EFFECTIVE_TS <= ? AND T1.EXPIRATION_TS >= ? I need values to get values of T1.EFFECTIVE_TS <= ? AND T1.EXPIRATION_TS t2581@hotmail.com wrote: ...

what is wrong with this script and how do I get the value in a php script
what is wrong with this script and how do I get the value Rij1 and Rij2 and Rij3 and Rij4 and Rij5 and Rij6 in a php script import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(17, GPIO.IN) GPIO.setup(18, GPIO.IN) GPIO.setup(21, GPIO.IN) GPIO.setup(22, GPIO.IN) GPIO.setup(23, GPIO.IN) GPIO.setup(24, GPIO.IN) Rij1 = 0 Rij2 = 0 Rij3 = 0 Rij4 = 0 Rij5 = 0 Rij6 = 0 while True: PRij1 = GPIO.input(17) PRij2 = GPIO.input(18) PRij3 = GPIO.input(21) PRij4 = GPIO.input(22) PRij5 = GPIO.input(23) PRij6 = GPIO.input(24) if (PRij1 == False): Rij1 = Rij1...

To get layout default mos parameters value for pcell ??
Is there any command to get the pcell parameter value in layout. Actually I have a code to do it.. but for default values its showing as nill. If we change the value of user defined parameters it print the value. How to get those default values?? --- vijayraj On 02/15/14 14:36, vijayraj wrote: > Is there any command to get the pcell parameter value in layout. > Actually I have a code to do it.. but for default values its showing > as nill. If we change the value of user defined parameters it print > the value. How to get those default values?? > --- > vijayraj > > If you have an instance Id, you'd do: instId~>master~>superMaster~>parameters~>w for example to get the default pcell "w" parameter. To get all of them, you could use: foreach(mapcar prop instId~>master~>superMaster~>parameters~>value list(prop~>name prop~>value) ) This will return a list of name-value pairs. Regards, Andrew. Thanks a lot andrew.. It helps me a lot.. ...

get parameter values from web.xml inside of a bean
Is there a way for me to get parameter values from web.xml file inside of a bean? I have parameters like the following in my web.xml file: <context-param> <param-name>userName</param-name> <param-value>xxxx</param-value> </context-param> <context-param> <param-name>password</param-name> <param-value>yyyy</param-value> </context-param> How do I get these values inside of a bean thats used in a JSP page. I am using WAS 4.0.5 app server (its servlet 2.2 specs). I do not want to use sessions. "Eqbal Z" <...

help getting value of cell and passing to PHP file
I have a table that gets generated every 5 minutes containing the drive space on my servers. The table is sortable via an external javascript file by clicking the column headers (using sortable.js found here: http://www.kryogenix.org/code/browser/sorttable/) the first 2 cells of the table are the server name and drive. When the server name in the first cell of any row is clicked on, I want to get the value of the data from that rows table cells and pass them to a PHP file that creates a chart of the data. I'm pretty sure javascript is the way to go, but I haven't figured out the right ...

Newbie: getting /SELECT ONCHANGE value into PHP var
This is very new to me, scripting languages. I am trying to get the /select id off of a dropdownlist, which really does not drop down and is more like a flat list??, at an onchange event. Then move it into a php var to retrieve different data from db. Not that it matters but I load about 1200 items in to the list and was surprised how fast it is. Could some one give me some direction? // // Handle the data coming back <OPTION VALUE="0">Choose a Group echo "<FORM NAME=author>"; echo "<SELECT NAME=author_pk SIZE=20 COLS=20 ONCHANGE=getPK()>";...

Web resources about - Must GET/POST Parameters Have Values? (And What is the Syntax for GET, If NOT) - comp.lang.php

Parameter - Wikipedia, the free encyclopedia
A parameter (from the Ancient Greek παρά , "para", meaning "beside, subsidiary" and μέτρον , "metron", meaning "measure"), in its common meaning, ...

fb_source Parameter - Facebook-Entwickler
This document lists the complete list of values for the fb_source parameter that is returned with th...

Google Webmaster Tools Parameter Handling - Flickr - Photo Sharing!
You aren't signed in Sign In Help Home The Tour Sign Up Explore Explore Home Last 7 Days Interesting Popular Tags Calendar Most Recent Uploads ...

Cat 8: TIA performance standards committee chairman previews parameters of forthcoming twisted-pair cable ...
Category 8, the next-generation twisted-pair cabling specification, is still in development, but the outlook looks quite positive that it will ...

Philippine president asks for 'parameters' of Mayon Volcano tours
Philippine president asks for 'parameters' of Mayon Volcano tours People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, Apr, May, ...

Alternatives to boolean parameters
... ) { PrintLine ( item . Name ); if ( printDetails ) { PrintLine ( item . Description ); } } } Aha! Now can see that the boolean parameter ...

Exporting Error (Error in Parameter...: Apple Support Communities
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability ...

Apple tech monitors device aging, adjusts operating parameters to ensure optimal performance
... describing a method of monitoring the aging of a device's electronics, comparing the data with a global average and modifying operating parameters ...

Is it poor programming practice to pass parameters as objects?
... a free, community-powered network of 100+ Q&A sites . Risser asked: So, we've got a guy who likes to write methods that take Objects as parameters, ...

Parameter Short Film Competition sponsored by Grolsch
Grolsch presents Parameter The A.V. Club Short Film Competition Please Enter Your Date of Birth Ineligible entry Enter For people over the age ...

Resources last updated: 3/17/2016 2:08:07 AM