Marshallbbw
Erfahrenes Mitglied
Hallo,
ich versuche auf einen Button eine bestimmte php-Funktion zu legen - hier mein beispiel
form.php
submit.php
onclick.php
Warum Geht das nicht - sieht für mich logisch aus - der submit-Button funktioniert aber der onclick-Button nicht - könnt Ihr mir bitte helfen!
ich versuche auf einen Button eine bestimmte php-Funktion zu legen - hier mein beispiel
form.php
Code:
<html>
<head>
<title>onClick-Events mit PHP-Funktionen</title>
</head>
<body>
<form action="submit.php">
<input type="submit" value="submit">
<input type="button" value="onclick" onClick="<?php include('onclick.php'); bla();?>">
</form>
</body>
</html>
submit.php
Code:
<?php
echo "Das ist die submit.php";
?>
onclick.php
Code:
<?php
function bla()
{
echo "Das ist die onclick.php";
}
?>
Warum Geht das nicht - sieht für mich logisch aus - der submit-Button funktioniert aber der onclick-Button nicht - könnt Ihr mir bitte helfen!