472,978 Members | 2,236 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,978 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 1616
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...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.