Wie <input type=image> statt submit richtig abfragen ?

Alles, was PHP betrifft, kann hier besprochen werden.

Wie <input type=image> statt submit richtig abfragen ?

Postby HENNER » 09. June 2005 15:05

Hi,

wie kann ich <input type=submit> durch <input type=image> ersetzen ohne das einige browser daran scheitern ??

HENNER
HENNER
 
Posts: 23
Joined: 07. March 2004 15:06

Postby Wiedmann » 09. June 2005 15:19

Welcher Browser scheitert daran?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby HENNER » 09. June 2005 16:16

Hi,

hatte bis neulich in einem script folgendes drin:

<form>
...
<input type="image" src="aenderungen_speichern.gif" name="submit" value="submit" id="submit">
</form>

script:

Code: Select all
if (isset($_POST["submit"]) AND isset($_POST["fzgid"]))
 {
  mach was;
  }
else
 {
 header("Location: script.php?action=view");
 }


der IE konnte damit nicht um und hat immer wieder das auswahlscript statt dem aenderungsscript gebracht ...

HENNER
HENNER
 
Posts: 23
Joined: 07. March 2004 15:06

Postby Wiedmann » 09. June 2005 16:54

a)
Code: Select all
<input type="image" src="foo.gif" name="submit">
...
if (isset($_POST['submit_x'])) {...}


b)
Code: Select all
<input type="image" src="foo.gif" name="submit[]">
...
if (isset($_POST['submit'])) {...}
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby HENNER » 09. June 2005 17:09

Hi,

werde es mal so probieren ... DANKE !

HENNER
HENNER
 
Posts: 23
Joined: 07. March 2004 15:06


Return to PHP

Who is online

Users browsing this forum: No registered users and 14 guests