Hello Angelo,
Tuesday, February 17, 2004, 12:52:13 PM, you wrote:
AZ> Say I want to populate a textfield from a resultset and the resultset's
AZ> field has 2 words in it say: mike smith.
AZ> when I echo the value out to the texfields value it only displays mike and
AZ> not mike smith, I cant understand why.
I would suggest tidying up the code a little to make life easier for
yourself. You don't have to have it in-line with the HTML:
<?php
if ($prospects !== "")
{
$value = $row['p_company'];
}
else
{
$value = "";
}
?>
<td><input type="text" name="company" value="<?=$value?>"></td>
Also if your database entry has quote marks in it, it will break this.
Here is one (of many) ways to solve it:
$value = htmlspecialchars($row['p_company']);
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php