dimanche 22 mars 2015

php $_POST is empty $HTTP_POST_VARS works

I have made a page that uses 3 forms. 2 of the forms i can catch the post information using the $_POST var. One of my forms however returns an empty $_POST var. I can catch it using the old $_HTTP_POST_VARS


I have matched my form with the other forms and can find no differences. My php version is 5.2.17 neither var_dump($_POST) or print_r($_POST) give me any result.


I eventualy got it working using the $_HTTP_POST_VARS but it keeps on buggling me, since $_POST was made to replace $_HTTP_POST_VARS since php 4.1 (or something close to that)



<p>Wachtwoord wijzigen</p>
<form id='changepwsd' name='changepswd' method='POST' action='".basename($_SERVER['PHP_SELF'])."' enctype='application/x-www-form-urlencoded'>
<label for='old' style='width: 170px; display: inline-block;'>Vorig wachtwoord:</label>
<input type='password' name='old' /><br />
<label for='new' style='width: 170px; display: inline-block;'>Nieuw wachtwoord:</label>
<input type='password' name='new' /><br />
<label for='confirm' style='width: 170px; display: inline-block;'>Bevestig wachtwoord:</label>
<input type='password' name='confirm' /><br />
<input type='submit' value='Wijzig' name='changepwsd' style='width:120px'/>
</form>
<br><br>

Aucun commentaire:

Enregistrer un commentaire