Use like this :
echo "<form action='Stud_controller/updateData' method='POST'>";
echo '<input type="hidden" name="sameId" value="'.$id.'">';
echo 'Name: <input type="text" name="newName" value="'.$name.'"> ';
echo '<input type="submit" value="Save">';
echo "</form>";
3
solved Displaying a form in HTML using PHP [closed]