Try
$_POST["frm"]["code"]
you can then do
echo $code1;
when you need the code.
A couple things though.
* You should check that the form was submitted and the code was set by checking
empty($_POST)
and
strlen($code1)
.
* You shouldn't use values sent by the user directly in your code, you should do a filter.
* You should consider using a templating engine, I use
Twig[
^], it helps with the point above.