get a value in the servlet with get, but null with postHi,
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:
...
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.
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.
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...
get-next-request and get-requestWhat is the real difference between the two commands ?
What will be used when ?
With the sniffer, it looks exactly the same.
In article <3ff1bea6$1@news.barak.net.il>,
Yoram Orzach <yoram@n-d-com.com> wrote:
>What is the real difference between the two commands ?
>
>What will be used when ?
>
>With the sniffer, it looks exactly the same.
The get-request will only match exactly the OID specified in the request.
It will fail of no such OID exists on the target. The get-next-request
will return the OID that is the "next" OID in the &quo...
reset a search form, GET values override posted values except on a new searchI have a search form for this sql query:
$sql="SELECT bu, cart_id, nationalDrugCode, error_flag ";
$sql.="FROM cart_inventory_complete ";
if ($bu!=''){ $sqlWhere="WHERE bu ='$bu' ";}
if ($cart_id !='') { $sqlWhere.="AND cart_id='$cart_id' ";}
if (($zoneid !='') && ($zonenm!='')) { $sqlWhere.="AND zoneid
='$zoneid'AND zonenm='$zonenm' ";}
$sqlWhere.="AND error_flag='1' ";
$sqlLimit="LIMIT $startPage, 25";
This query worked on the first page of the search, but not on the
second page, because the page numbering system is based on the GET
value for the current page number. The filtered value is lost for the
$sqlWHERE on the 2nd page, so I added the $sqlWhere values to the GET
string in the page numbering section at the bottom. I solved it by
setting the values of the vars first to the GET value and if no GET
then take the POST value. It works now to show all the pages of the
current search :-)
The only issue I have now is if the user changes the search on the
current page.
He has seen the values displayed and wants to do a totally new
search. I have to change the PAGE current page number and reset the
the GET values to "".
for ( $p=1;$p<=$noPages;$p++ ) {
echo " <a href='$me?page=$p&error_flag=1&nRecs=$nRecs&bu=
$bu&zoneid=$zoneid&zonenm=$zonenm&...
Redirecting POST Requests with mod_perl<Using mod_perl2 and Apache2 on Win32>
I am attempting to redirect a POST request, while preserving the
recently passed form parameters. I found the following example in the
mod_perl docs but it doesn't seem to be working. The form parameters
aren't available on the receiving page. Line 3 appears to be retriving
the form parameters and line 7 appears to be setting them for the
receiving page, but they aren't available. Am I misunderstanding
something here?
1. use Apache::Constants qw(M_GET);
2. my $r = shift;
3. my $content = $r->content;
4. $r->method("G...
Net::HTTPI have a peculiar problem where I need to submit POST data to a script
which has get variables (script.asp?variable=true)
But Net:HTTP seems to have gone to great lengths to prevent this.
Obviously, its messy and looked down upon but unfortunately I cannot
control this.
Running tests:
body =
Net::HTTP.post_form(URI.parse('http://www.server.net/post.php?x=y'),
{'A'=>'1','B'=>'2','C' => '3'})
puts body.body
---------
Above, the POST variables are the only ones which hit the server.
Apparently everything after the '?' ...
Getting values into running VRML from PHPHi 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...
Get max value of int in phpHi 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)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknDq0YACgkQE++2Zdc7EtdeVwCfXg9UFn9VILxf5rt4fDsUN7WA
TFwAn3hSc8rCgaZwc0wRzEdeTWYtrsTA
=ggGT
-----END PGP SIGNATURE-----
nikhil schreef:
> 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
PHP_INT_MAX is what you're looking for.
--
Amygdala
http://amygdala.110mb.com/
On Mar 20, 7:07=A0pm, nikhil <nikhilpanpa...@gmail.com> 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
Hi Nikhil,
Are you looking for getting maximum value in an Integer array?
Thanks,
Baalu
baalu aanand wrote:
> On Mar 20, 7:07 pm, nikhil <nikhilpanpa...@gmail.com> wrote:
>...
convert a GET to a POST before output to phpI 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"&...
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 ...
Http POST requests changed to GET by proxy?Hi,
we have a software solution which works fine since several years for
several different companies: It's an applet which communicates with a
servlet using HTTP POST connections and displays results from the
server/servlet.
A new potential customer (i.e. company) now encounters a weird
behaviour: They have some kind of Microsoft proxy server sitting
between the applet and the servlet engine.
When our applet creates a HTTP connection to the server it uses
something as follows:
conn.setRequestMethod ("POST");
conn.setRequestHeader(...,...);
PrintWriter out = new PrintWriter(connect.getOutputStream());
out.println(data);
out.flush();
connect.connect();
Normally one would expect that this leads to a call to doPost of the
servlet.
But for an unknown reason the Microsoft proxy does something completely
unknown and creates an HTTP GET request, thus doGet will be called on
the server and the content of the request is missing and the request
thus is invalid.
This does not happen all the time, it happens round about every tenth
time or after about 15 secs of idle time (i.e. when the user does not
make a connection to the server).
Does anybody out there have a similar problem and perhaps a solution?
Why does the MS proxy change something in the request?
We cannot further examine which request headers get sent because the
presentation is over (had to use a modem dial connection) and all we
have are the log entries.
Hoping for some clarifying answers,
Alex
schon...
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...
post or get message postingHi
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...
what is wrong with this script and how do I get the value in a php scriptwhat 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...
How to get Response URL value Hi,
I have a problem here.
I have a ruby code that opens Google, types "book stores" and clicks on
"Search" button.
# Code Snippet Begins here
require 'net/http'
require 'uri'
require 'watir'
term="book stores"
url1 = 'http://www.google.com'
ie = Watir::IE.start(url1)
ie.text_field(:name, "q").set(term)
ie.button(:name, "btnG").click
# Code Snippet Ends here
Now I need to obtain the value of the response URL generated by this
search and assign it to a variable.
[ i.e. http://www.google.com/search?hl=en&am...
help getting value of cell and passing to PHP fileI 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 ...
How to get enum values from MySQL column using PHP?I'm trying to populate an HTML <select> statement with the enum values
from a MySQL column using PHP. Can anyone tell me how to access these
enum values using PHP?
Thanks,
Don
Don wrote:
> I'm trying to populate an HTML <select> statement with the enum values
> from a MySQL column using PHP. Can anyone tell me how to access these
> enum values using PHP?
>
> Thanks,
> Don
More of a MySQL question, but here you go:
SELECT yourEnumColumn+0 FROM yourTable;
This requests the value as an integer, so it will result one (and the
one you want).
SELECT CONCAT('', yourEnumColumn) FROM yourTable;
Will off course do the opposite, but you wouldn't need it as the string
value is returned by default.
Best regards.
On Thu, 12 Mar 2009 16:36:43 +0100, Dikkie Dik <dikkie@nospam.org>
wrote:
>Don wrote:
>> I'm trying to populate an HTML <select> statement with the enum values
>> from a MySQL column using PHP. Can anyone tell me how to access these
>> enum values using PHP?
>>
>> Thanks,
>> Don
>More of a MySQL question, but here you go:
>
>SELECT yourEnumColumn+0 FROM yourTable;
>
>This requests the value as an integer, so it will result one (and the
>one you want).
>
>SELECT CONCAT('', yourEnumColumn) FROM yourTable;
>
>Will off course do the opposite, but you wouldn't need it as the string
>value is returned by default.
>
>Bes...
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" type="text" name="name" value="<?php echo
$_COOKIE["name"]; ?>">
literally "savename.value" is alerted.
I need the cookie value to echo.
Help is appreciated,
Matt
Matt Brown - identify wrote:
> 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>
>
&...
How PHP $_POST gets the multiple values from a HTML form?I am try test a simple HTML form with PHP
<form method=POST action="testing.php">
Cat <input type="checkbox" name="pet" value="cat">
Dog <input type="checkbox" name="pet" value="dog">
Pig <input type="checkbox" name="pet" value="pig">
<br>
<select name="dates" multiple>
<option value="Monday">Monday</option>
<option value="Tuesday">Tuesday</option>
<option value="Wednesday">Wednesday</op...
connection to server, & make GET/POST requestHello,
This is my first application on socket programming in vc++. I am facing
problem that how to make connection to server, & make GET/POST request
by HTTP.
Please help me. Its urgent....
Thanks
"rup" <rthangaokar@gmail.com> wrote in message
news:1168074072.683624.324750@38g2000cwa.googlegroups.com...
> Hello,
> This is my first application on socket programming in vc++. I am facing
>
> problem that how to make connection to server, & make GET/POST request
> by HTTP.
> Please help me. Its urgent....
If it's that urgent, use InternetOpenUrl() and other higher level API's.
But if you want to use winsock yourself then you'll just have to learn. MSDN
has many samples and the net is full of them....
- Sten
...
Redirecting a http POST request, without loosing data?I have a web service that has moved to another server, but clients
still use the old server.
What i need to do is simply redirect their requests to the new server,
and keep all data in the redirect process. simple http redirect looses
data, and the servlet dispatcher mechanism works only for redirecting
to local resources.
Is there anything i can do to redirect the request?
Here is the POST request:
POST http://oldserver/service HTTP/1.1
Host: xxx.xxx.xxx.xxx
Proxy-Connection: Keep-Alive
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: RPT-HTTPClient/0.3-3
SOAPAction: "&...
How to get value from drop down box to e-mail with phpI have a form that includes a drop down box. I can get all of the other
values to show up in an e-mail except for the drop down box values. Can
someone please help? -- I know the HTML isn't the greatest. The website
was originally created in FrontPage and the form broke. I'm just trying
to help out and fix it for a friend.
sendmail.php
<?
$Name = $_REQUEST['name'] ;
$Comments = $_REQUEST['comments'] ;
$Email = $_REQUEST['email'] ;
$Telephone = $_REQUEST['telephone'];
$Fax = $_REQUEST['fax'];
$Subject = $_REQUEST['subject'];
$SubjectOther = $_REQUEST['subjectother'];
$ContactRequested = $_REQUEST['contactrequested'];
mail( "kandihumpf@site-seeker.com", "RCI Waterjets Contact Us Form",
"Name: $Name \n\nComments: $Comments \n\nEmail: $Email
\n\nTelephone: $Telephone \n\nFax: $Fax \n\nSubject: $Subject
\n\nSubject Other: $SubjectOther \n\nContact Requested:
$ContactRequested", "From: kandihumpf@site-seeker.com" );
header( "Location: http://www.rciwaterjets.com/Thanks.htm" );
?>
ContactUsNEW.htm
<form method="post" action="sendmail.php">
<p align="center">
<textarea name="comments" rows="8" cols="66">Please Enter your
details here</textarea></p>
<dl>
<dd>
<table width="450">
<tr>...
Newbie: getting /SELECT ONCHANGE value into PHP varThis 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()>";
while ($rows = mysql_fetch_object($result)) {
echo "<OPTION VALUE=".$rows->id.">".
$rows->TITLE." ".
$rows->lastname.", ".
$rows->firstname.
$rows->middlename.
$rows->SUFFIX.
"</OPTION>";
}
echo "</SELECT>";
echo "</FORM>";
echo "<script language=Javascript>";
echo "function getPK() {";
<? $location ?> =
"document.author.author_pk.options[document.author.author_pk.selectedIndex].value
";
echo "}";
echo "</script>";
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
________________________________________________...
html proxy form converts a GET to a POST for processing with PHPI have a desktop database application that can send an address string
from an embedded web applet. The only output I can get from this
database is an HTTP GET with the address list. I need to capture this
address list from the GET url then POST the address string to a php
page.
I call this proxy page clientsideform.html. It is a local html page
on the hard drive. This is on a mac. There are reasons why I'm doing
it this way.
In any case, I'm not doing the GET right to get the value that comes
after my web server, the get string addr=" "
----------------------------- clientSidePost.html--------------
<html><head>
<title>HTTP Proxy</title>
<body onload="document.pgform.submit()">
var addressList = GET "file://clientSidePost.html&addr= HTTP/1.0
document.write(addressList);
<form name = "pgform_post" method="post" action="http://localhost/
Soliant/googlemap.php"
<TEXTAREA NAME= addr>
</TEXTAREA>
<INPUT TYPE=SUBMIT VALUE="Show Map"
/form>
</head>
</script>
</body>
</html>
------------------------------
<html><head>
<title>HTTP Proxy</title>
<body onload="document.pgform.submit()">
var addressList = GET "file://clientSidePost.html&addr= HTTP/1.0
document.write(addressList);
<form name = "pgform_post" method="post" action="http://localhost/
Soliant...