pagina con il form
script.phpCodice PHP:<form name='prova' method='post' action='script.php'>
<input type='submit' name='bottone1' value='premi il bottone 1' />
<input type='submit' name='bottone2' value='premi il bottone 2' />
</form>
Codice PHP:if(isset($_POST['bottone1']))
echo "Hai premuto il bottone 1, il valore è: ".$_POST['bottone1'];
else if(isset($_POST['bottone2']))
echo "Hai premuto il bottone 2, il valore è: ".$_POST['bottone2'];

Rispondi quotando