hi,

I am facing parser error while embedding php tag in text box value.

print "<tr><td><font color=\"#0080FF\" face=\"sans-serif\" size=\"2\"><b>emp :$nbsp</b><input type='text' name='txt1' size='10' style=text-transform:uppercase maxlength='7' value="<?php echo $_POST[txt1];?> ></font></td></tr>";

please help me out.

Recommended Answers

You can not embed php tag inside php code, so following is the correct line

print "<tr><td><font color=\"#0080FF\" face=\"sans-serif\" size=\"2\"><b>emp nbsp</b><input type='text' name='txt1' size='10' style=text-transform:uppercase maxlength='7' value=\"{$_POST[txt1]}\" ></font></td></tr>";
Jump to Post

All 2 Replies

You can not embed php tag inside php code, so following is the correct line

print "<tr><td><font color=\"#0080FF\" face=\"sans-serif\" size=\"2\"><b>emp nbsp</b><input type='text' name='txt1' size='10' style=text-transform:uppercase maxlength='7' value=\"{$_POST[txt1]}\" ></font></td></tr>";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.