Prova a seguire gli standard html.
<input type="text" value="$variabile" />