Re: [PHP] Submit Image Button

2003-04-04 Thread Marek Kilimajer
Even if it would be fixed right now, you cannot count on it for several 
years ;-)

Daevid Vincent wrote:

Anyone know if this annoying behaviour will ever be 'fixed' in future HTML
specs? I can't believe what a glaring oversight this is that the 'value'
doesn't get GET/POSTED like with a normal 'submit' button... WTF were they
thinking?
 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Submit Image Button

2003-04-03 Thread -{ Rene Brehmer }-
On Wed, 2 Apr 2003 21:41:02 -0500, John Coggeshall wrote about RE: [PHP]
Submit Image Button what the universal translator turned into this:

Well you can ignore it if you don't need the X/Y cord... But you can use
it to make sure the button was clicked:

If(!$_GET['sub_x'] || !_GET['sub_y']) {
   // display form
} else {
   // it was submitted

If you can't click the button without getting both a X and Y coordinat,
wouldn't it make more sense to use AND instead of OR in the above logex??

So it would be:

If(!$_GET['sub_x']  !$_GET['sub_y']) {
// display form
} else {
// it was submitted

Plus you're missing a $ in the second $_GET...

Rene

-- 
Rene Brehmer

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit Image Button

2003-04-03 Thread Thomas
It works either way apparently...plus, I need the $POST not $_GET.  but it
works aswell.


-{ Rene Brehmer }- [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Wed, 2 Apr 2003 21:41:02 -0500, John Coggeshall wrote about RE: [PHP]
 Submit Image Button what the universal translator turned into this:

 Well you can ignore it if you don't need the X/Y cord... But you can use
 it to make sure the button was clicked:
 
 If(!$_GET['sub_x'] || !_GET['sub_y']) {
  // display form
 } else {
  // it was submitted

 If you can't click the button without getting both a X and Y coordinat,
 wouldn't it make more sense to use AND instead of OR in the above logex??

 So it would be:

 If(!$_GET['sub_x']  !$_GET['sub_y']) {
 // display form
 } else {
 // it was submitted

 Plus you're missing a $ in the second $_GET...

 Rene

 --
 Rene Brehmer

 This message was written on 100% recycled spam.

 Come see! My brand new site is now online!
 http://www.metalbunny.net



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Submit Image Button

2003-04-03 Thread Ford, Mike [LSS]
 -Original Message-
 From: -{ Rene Brehmer }- [mailto:[EMAIL PROTECTED]
 Sent: 03 April 2003 15:28
 
 On Wed, 2 Apr 2003 21:41:02 -0500, John Coggeshall wrote 
 about RE: [PHP]
 Submit Image Button what the universal translator turned into this:
 
 Well you can ignore it if you don't need the X/Y cord... But 
 you can use
 it to make sure the button was clicked:
 
 If(!$_GET['sub_x'] || !_GET['sub_y']) {
  // display form
 } else {
  // it was submitted
 
 If you can't click the button without getting both a X and Y 
 coordinat,
 wouldn't it make more sense to use AND instead of OR in the 
 above logex??

Since clicking the button gives you both X and Y co-ordinates, and not clicking it 
gives you neither, why even bother checking both?  Just testing one or the other would 
be quite sufficient.  (And, if you insist on testing both, it makes no difference 
whether you use and or or -- just so long as you don't use xor!)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit Image Button

2003-04-03 Thread Maciek Ruckgaber Bielecki
have a look on button tag in w3c.org mate

On Wed, Apr 02, 2003 at 09:27:01PM -0500, Thomas wrote:
 I have a problem with my php.
 
 I have a form and in that form there is an image submit button.  When I
 click on it, it won't tell me if the submit button is clicked.
 It works fine with a normal one.
 
 sample:
 
 ?
  if (!$submit) {
 ?
 
 form name= method=post action=?php echo $PHP_SELF ?
 input type=text name=username size=20 Class=Box
 input type=password name=passwd size=20 Class=Box
 input type=checkbox name=remember value=1
 input type=image src=../News/themes/xFClan/button_submit.gif
 border=0 name=submit value=Login width=55 height=19 alt=Submit
 /form
 
 ?
 } else {
 echo you clicked;
 }
 ?
 
 If I use input type=submit ...   This works finedo I need to do
 something else with the code?
 Help is very appreciated.
 
 Cheers.
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 

Maciek Ruckgaber Bielecki
Desarrollo
http://www.colegiosenlinea.com

Perfection of means and confusion of ends seem to characterize our age.
--Albert Einstein--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Submit Image Button

2003-04-03 Thread Daevid Vincent
Anyone know if this annoying behaviour will ever be 'fixed' in future HTML
specs? I can't believe what a glaring oversight this is that the 'value'
doesn't get GET/POSTED like with a normal 'submit' button... WTF were they
thinking?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Submit Image Button

2003-04-02 Thread John Coggeshall

http://www.php.net/manual/en/language.variables.external.php

input type=image src=image.gif name=sub

This creates variables $_GET['sub_x'] and $_GET['sub_y'] containing the
X/Y cordinate where the button was clicked (assuming it was GET method
form submission)

John

-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


-Original Message-
From: Thomas [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 02, 2003 9:27 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Submit Image Button


I have a problem with my php.

I have a form and in that form there is an image submit 
button.  When I click on it, it won't tell me if the submit 
button is clicked. It works fine with a normal one.

sample:

?
 if (!$submit) {
?

form name= method=post action=?php echo $PHP_SELF ?
input type=text name=username size=20 Class=Box
input type=password name=passwd size=20 Class=Box
input type=checkbox name=remember value=1
input type=image 
src=../News/themes/xFClan/button_submit.gif
border=0 name=submit value=Login width=55 height=19 
alt=Submit
/form

?
} else {
echo you clicked;
}
?

If I use input type=submit ...   This works finedo I 
need to do something else with the code? Help is very appreciated.

Cheers.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit Image Button

2003-04-02 Thread Thomas
ok, sorry I'm a newb...what do I do with that info?  I saw that page, but it
makes no sense to me

Thomas


John Coggeshall [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 http://www.php.net/manual/en/language.variables.external.php

 input type=image src=image.gif name=sub

 This creates variables $_GET['sub_x'] and $_GET['sub_y'] containing the
 X/Y cordinate where the button was clicked (assuming it was GET method
 form submission)

 John

 -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
 John Coggeshall
 john at coggeshall dot org  http://www.coggeshall.org/
 -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


 -Original Message-
 From: Thomas [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 9:27 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Submit Image Button
 
 
 I have a problem with my php.
 
 I have a form and in that form there is an image submit
 button.  When I click on it, it won't tell me if the submit
 button is clicked. It works fine with a normal one.
 
 sample:
 
 ?
  if (!$submit) {
 ?
 
 form name= method=post action=?php echo $PHP_SELF ?
 input type=text name=username size=20 Class=Box
 input type=password name=passwd size=20 Class=Box
 input type=checkbox name=remember value=1
 input type=image
 src=../News/themes/xFClan/button_submit.gif
 border=0 name=submit value=Login width=55 height=19
 alt=Submit
 /form
 
 ?
 } else {
 echo you clicked;
 }
 ?
 
 If I use input type=submit ...   This works finedo I
 need to do something else with the code? Help is very appreciated.
 
 Cheers.
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Submit Image Button

2003-04-02 Thread John Coggeshall

Well you can ignore it if you don't need the X/Y cord... But you can use
it to make sure the button was clicked:

If(!$_GET['sub_x'] || !_GET['sub_y']) {
// display form
} else {
// it was submitted

-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


-Original Message-
From: Thomas [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 02, 2003 9:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Submit Image Button


ok, sorry I'm a newb...what do I do with that info?  I saw 
that page, but it makes no sense to me

Thomas


John Coggeshall [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

 http://www.php.net/manual/en/language.variables.external.php

 input type=image src=image.gif name=sub

 This creates variables $_GET['sub_x'] and $_GET['sub_y'] containing 
 the X/Y cordinate where the button was clicked (assuming it was GET 
 method form submission)

 John

 
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
 John Coggeshall
 john at coggeshall dot org  
http://www.coggeshall.org/
 
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


 -Original Message-
 From: Thomas [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 9:27 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Submit Image Button
 
 
 I have a problem with my php.
 
 I have a form and in that form there is an image submit 
button.  When 
 I click on it, it won't tell me if the submit button is clicked. It 
 works fine with a normal one.
 
 sample:
 
 ?
  if (!$submit) {
 ?
 
 form name= method=post action=?php echo $PHP_SELF ?
 input type=text name=username size=20 Class=Box
 input type=password name=passwd size=20 Class=Box
 input type=checkbox name=remember value=1
 input type=image 
 src=../News/themes/xFClan/button_submit.gif
 border=0 name=submit value=Login width=55 height=19 
 alt=Submit
 /form
 
 ?
 } else {
 echo you clicked;
 }
 ?
 
 If I use input type=submit ...   This works finedo 
I need to 
 do something else with the code? Help is very appreciated.
 
 Cheers.
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit Image Button

2003-04-02 Thread Thomas
AwesomeThank you so much.

Cheers.

Thomas


John Coggeshall [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 Well you can ignore it if you don't need the X/Y cord... But you can use
 it to make sure the button was clicked:

 If(!$_GET['sub_x'] || !_GET['sub_y']) {
 // display form
 } else {
 // it was submitted

 -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
 John Coggeshall
 john at coggeshall dot org  http://www.coggeshall.org/
 -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


 -Original Message-
 From: Thomas [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2003 9:39 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Submit Image Button
 
 
 ok, sorry I'm a newb...what do I do with that info?  I saw
 that page, but it makes no sense to me
 
 Thomas
 
 
 John Coggeshall [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
  http://www.php.net/manual/en/language.variables.external.php
 
  input type=image src=image.gif name=sub
 
  This creates variables $_GET['sub_x'] and $_GET['sub_y'] containing
  the X/Y cordinate where the button was clicked (assuming it was GET
  method form submission)
 
  John
 
 
 -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
  John Coggeshall
  john at coggeshall dot org
 http://www.coggeshall.org/
 
 -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
 
 
  -Original Message-
  From: Thomas [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, April 02, 2003 9:27 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Submit Image Button
  
  
  I have a problem with my php.
  
  I have a form and in that form there is an image submit
 button.  When
  I click on it, it won't tell me if the submit button is clicked. It
  works fine with a normal one.
  
  sample:
  
  ?
   if (!$submit) {
  ?
  
  form name= method=post action=?php echo $PHP_SELF ?
  input type=text name=username size=20 Class=Box
  input type=password name=passwd size=20 Class=Box
  input type=checkbox name=remember value=1
  input type=image
  src=../News/themes/xFClan/button_submit.gif
  border=0 name=submit value=Login width=55 height=19
  alt=Submit
  /form
  
  ?
  } else {
  echo you clicked;
  }
  ?
  
  If I use input type=submit ...   This works finedo
 I need to
  do something else with the code? Help is very appreciated.
  
  Cheers.
  
  
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php