Da ieri, senza aver installato niente!! ho un problema con tutti i programmi che hanno il form con method = POST. Mi arrivato tutti con array() vuoti!
Ho provato a modificare il form, da POST a GET e funzionano normalmente.
Allora ho provato a scrivere un form banale, due righe :
codice HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<form action="arrivopost.php" method="post">
Nome : <input type="text" name="name"><br>
E-mail : <input type="text" name="email"><br>
<Button type="submit">Conferma </button>
</form>
</body>
</html>
in arrivopost.php ho messo due controlli :
Codice PHP:
<?php
echo 'Nome : '. $_POST["name"] .'<br>';
echo 'Email: '. $_POST["email"];
$method = $_SERVER['REQUEST_METHOD'];
echo 'metod in arrivo = '.$method.'<br>';
?>
la risposta è sempre quella ...
Warning: Undefined array key "name" in C:\xampp\htdocs\nestagency\cms\test\arrivopost.php on line 5
Nome :
Warning: Undefined array key "email" in C:\xampp\htdocs\nestagency\cms\test\arrivopost.php on line 6
Email: metod in arrivo = GET
arriva sempre in GET anche se è impostato a POST
Qualcuno mi saprebbe aiutare? Potrei modificare tutti gli script in GET ma sono veramente troppi!!