Мне не удается интерполировать переменную внутри строки формы HTML.
var DocType = "global"; // Declare a global variable
DocType = "TEST"; //Variable set to test string
<form id="formName" action="DoSomething.php?cFN=" + DocType method="post" enctype="multipart/form-data">
//I have also tried
<form id="formName" action="DoSomething.php?cFN=" + 'DocType' method="post" enctype="multipart/form-data">
//I have also tried using $ instead of var but still the same issues.
Во всех случаях php всегда повторяет 'DocType', а не его значение «TEST», как я ожидал.