µaTh
01.09.2006, 11:20:26
Hallo,
ich will formulare per textlink abschicken, weil ich die buttonvariante ziemlich hässlich finde. ich habe das jetzt über javascript hinbekomen.
<html>
<body>
<form name=test action=index.php method=post>
<input name=input1 value="wert">
<input type=submit name=link1 value=los>
<input type=submit name=link2 value=los2>
<a href="javascript:document.test.submit()" name=link3>JavaScriptAbsenden</a>
</form>
<?php
if (isset($_POST['link1'])) echo "Button1".$_POST['input1'];
if (isset($_POST['link2'])) echo "Button2".$_POST['input1'];
if (isset($_POST['link3'])) echo "Button3".$_POST['input1'];
?>
</body>
</html>
nun möchte ich aber, dass der name des links noch mit übergeben wird, wie ich es oben versucht habe. kennt da jemand von euch eine möglichkeit?
Viele Grüße
µaTh
ich will formulare per textlink abschicken, weil ich die buttonvariante ziemlich hässlich finde. ich habe das jetzt über javascript hinbekomen.
<html>
<body>
<form name=test action=index.php method=post>
<input name=input1 value="wert">
<input type=submit name=link1 value=los>
<input type=submit name=link2 value=los2>
<a href="javascript:document.test.submit()" name=link3>JavaScriptAbsenden</a>
</form>
<?php
if (isset($_POST['link1'])) echo "Button1".$_POST['input1'];
if (isset($_POST['link2'])) echo "Button2".$_POST['input1'];
if (isset($_POST['link3'])) echo "Button3".$_POST['input1'];
?>
</body>
</html>
nun möchte ich aber, dass der name des links noch mit übergeben wird, wie ich es oben versucht habe. kennt da jemand von euch eine möglichkeit?
Viele Grüße
µaTh