I am trying to learn php and I have seen some w3coded javascript stack videos and tutorials, when creating session w3coded javascript stack variables which values are going to be pulled w3coded javascript stack out from values entered in input elements, the w3coded javascript stack "id" of the input element is the one that w3coded javascript stack matters while when checking if a submit button w3coded javascript stack was clicked is the "name" of the input element w3coded javascript stack what matters?, w3coded javascript stack w3coded javascript stack Did you try printing both of w3coded javascript stack them? e.g. print $_POST['first_name']; and then w3coded javascript stack print $_POST['firstname'];Doing so should tell w3coded javascript stack you which gives you the input value. w3coded javascript stack – FelisCatus w3coded javascript stack Sep 30 '15 at 5:50 w3coded javascript stack ,Id and Classes are mainly for w3coded javascript stack CSS or JavaScript purpose.Use name for getting w3coded javascript stack the post values $_POST['firstname']., w3coded javascript stack Stack w3coded javascript stack Overflow for Teams w3coded javascript stack Where developers & technologists share private w3coded javascript stack knowledge with coworkers w3coded javascript stack
Id and Classes are mainly for CSS or JavaScript purpose.Use name for getting the post values $_POST['firstname']
.
<input name="firstname" type="text" id="first_name">
It takse name atribute, not the ID one. You have to use
$fname = $_POST['firstname'];
Last Update : 2023-09-22 UTC 12:01:03 PM
Last Update : 2023-09-22 UTC 12:00:57 PM
Last Update : 2023-09-22 UTC 12:00:44 PM
Last Update : 2023-09-22 UTC 12:00:36 PM
Last Update : 2023-09-22 UTC 12:00:28 PM
Last Update : 2023-09-22 UTC 11:59:48 AM
Last Update : 2023-09-22 UTC 11:59:30 AM