I have simple php script that contains this part:
$user = '<input type="text" name="name1" id="username" value="'.$firsttext.'">';
echo $user;
Do someone know how to get the text from the field? Thanks
I tried
echo $_GET['username'];
I am noob in php
1
Answers
To retrieve the value using $_GET:
Make sure that the name attribute of the input field and the key used in $_GET match. In this case, you should use $_GET[‘name1’] to access the value of the "name1" input field.