Php – If naming a form element is deprecated, how do you get the value in POST from PHP

htmlphp

I only know how to get POST values via named elements, such as:

<?php
$value = $_POST['value'];

But that would require naming my form elements, which does not validate.

The invalid code would look something like this:

<form id="myForm" method="post" action="#">
<input type="text" name="text" />

Best Solution

The lines you provide are valid. There must be some other part of the html that is invalid.