473,397 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Post to self?

if test.php is this file:
<?php
$lang = $_POST["lang"];
print $lang;
?>

<form method=post action=test.php>
<input type=image src=engFlag.jpg name="lang" value=en>
<input type=image src=fraFlag.jpg name="lang" value=fr>
</form>

Why won't it print $lang; after having one of the images clicked?
Sep 2 '06 #1
2 1627
On Sat, 02 Sep 2006 20:07:21 GMT, Jon Pike <an********@spamless.comwrote:
>if test.php is this file:

<?php
$lang = $_POST["lang"];
print $lang;
?>
<form method=post action=test.php>
<input type=image src=engFlag.jpg name="lang" value=en>
<input type=image src=fraFlag.jpg name="lang" value=fr>
</form>

Why won't it print $lang; after having one of the images clicked?
Does here on Firefox.

But on Internet Explorer it only posts "lang_x" and "lang_y" for the
coordinates of the click.

http://www.w3.org/TR/html4/interact/forms.html#h-17.4.1

The "." from the standard is transformed by PHP into "_".

IE's behaviour here is very unhelpful, and probably a violation of the
standard; it says the x and y are included in the submitted data, but doesn't
say to eliminate the original name/value pair.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Sep 2 '06 #2
Andy Hassall <an**@andyh.co.ukwrote in
news:m5********************************@4ax.com:
On Sat, 02 Sep 2006 20:07:21 GMT, Jon Pike <an********@spamless.com>
wrote:
>>if test.php is this file:

<?php
$lang = $_POST["lang"];
print $lang;
?>
<form method=post action=test.php>
<input type=image src=engFlag.jpg name="lang" value=en>
<input type=image src=fraFlag.jpg name="lang" value=fr>
</form>

Why won't it print $lang; after having one of the images clicked?

Does here on Firefox.

But on Internet Explorer it only posts "lang_x" and "lang_y" for the
coordinates of the click.

http://www.w3.org/TR/html4/interact/forms.html#h-17.4.1

The "." from the standard is transformed by PHP into "_".

IE's behaviour here is very unhelpful, and probably a violation of
the
standard; it says the x and y are included in the submitted data, but
doesn't say to eliminate the original name/value pair.
Ah, very clear, thank you!
Sep 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Molly | last post by:
Peace, Pythonphiles! Python's std lib BaseHTTPServer: I'm stuck with a nasty spoiler -- I get erratic "Network error: disconnected by peer" for _POST_ requests only. =Background= I'm...
6
by: Thomas Philips | last post by:
I have a question about deleting objects. My game has two classes, Player and Alien, essentially identical, instances of which can shoot at each other. Player is described below class...
3
by: Premshree Pillai | last post by:
Hello, I recently posted a simple Python script--Watch That Post--that lets you watch a URL for any changes. I wrote it to watch posts on LiveJournal, but it can watch any URL. It's at...
2
by: Raaijmakers, Vincent (GE Infrastructure) | last post by:
Please tell me if this is true or not.. In a all my applications I used the old fashioned way of "POST" requests: params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) headers =...
0
by: Pieter Edelman | last post by:
Hi all, I'm trying to submit some data using a POST request to a HTTP server with BASIC authentication with python, but I can't get it to work. Since it's driving me completely nuts, so here's...
16
by: Andy Lai | last post by:
Hi, I am writing a C++ program which needs to post an XML to an HTTP server periodically and the program will run on different platforms including w32, linux, and unix. I see that there are...
6
by: test | last post by:
Hi everyone, I'm creating a desktop Python application that requires web-based authentication for accessing additional application features. HTTP GET is really simple. HTTP POST is not (at...
1
by: Christopher J. Bottaro | last post by:
Hi, I can't for the life of me figure out how to get the post vars when using basehttpserver. Here's my code: <code> class MyHandler(BaseHTTPRequestHandler): def do_POST(self):
4
by: Wolfgang Draxinger | last post by:
I'm thinking about writing a script to upload videos to sites like YouTube or Google Video, which is usually done by a HTTP POST. The problem is, that videos, by nature are rather big files,...
1
by: mark starnes | last post by:
Hi everyone, this is my first post to this group, so please be gentle. I've written a class which, when I attempt to pickle, gives the error: *** RuntimeError: maximum recursion depth exceeded...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.