Hello all, I get stuck, and it doesn't work.
I have a first file:
<FORM METHOD="get" ACTION="prop_principale.php">
<input type="image" src="images\recherche.gif" name="action1" value="Recherche">
<input type="image" src="images\modifier.gif" name="action2" value="Modifie">
<input type="image" src="images\supprime.gif" name="action3" value="Supprime">
<INPUT TYPE="image" src="images\ajout_client.gif" name="action4" VALUE="Ajouter un client">
</FORM>
Within the "prop_principale.php" I try to make redirections:
<?
echo $action1;
echo $action2;
echo $action3;
echo $action4;
echo $_GET["action1"];
echo $_GET["action2"];
echo $_GET["action3"];
echo $_GET["action4"];
if (isset($_GET["action1"])) {
include('liste_animaux.php');}
...
I have to admit also that
header("Location: 'liste_prop.php'"); does't work... ??? 😕
I get:
Notice: Undefined variable: action1 in.....line.....
and
Notice: Undefined index: action4 in........ line ........
I have tried also with the same result:
<FORM METHOD="get" ACTION="prop_principale.php">
<input type="image" src="images\recherche.gif" name="action" value="Recherche">
<input type="image" src="images\modifier.gif" name="action" value="Modifie">
<input type="image" src="images\supprime.gif" name="action" value="Supprime">
<INPUT TYPE="image" src="images\ajout_client.gif" name="action" VALUE="Ajouter un client">
</FORM>
with:
<?
echo $_GET["action"];
if (isset($_GET["action"])) {
switch($_GET["action"]) {
case "Recherche" : ........}
Any idea??
1.) How to redirect with multi-submit?
2.) How to know wich submit was pressed?