Hi, please could you guys help me with the syntax for one line of a form? I have a problem when editing data that sometimes all the text in a field is not shown. Would like to try this alternative way . If anyone has other suggestions.... I'm all eyes..... :-) Thanks in advance. FJW
>>
printf("<TR><TD align=right><B>Nearest Town:</B></TD><TD><INPUT TYPE=Text SIZE=30 NAME=Town Value=".$formValues."></TD> This is my original and sometimes has problems

want to try it like this but how to make it work?
printf("<td class=hr><? echo htmlspecialchars(Town).\"&nbsp;\" ?></td>
<td class=dr><input type=text name=Town maxlength=30 value=\"<? echo str_replace('"', '&quot;', trim($row)) ?>\"></td>");

$form = "<td class=hr>";
$form .= htmlspecialchars(Town)."&nbsp;</td>";
$form .= "<td class=dr><input type=text name=Town maxlength=30 value=\"". str_replace('"', "&quot;", trim($row)) ."\"></td>";

echo $form;

Always use escaping \ when you use quotations inside another quotations, you could separate and concatenate items to deal then more clearly.

Thanks for the post Martin5211, I really appreaciate it.
Best F

Be a part of the DaniWeb community

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