Re: php as default "value" in html
| From: | Mark | Date: | Sun, 04 Apr 2004 15:32:54 +0000 |
| Subject: | Re: php as default "value" in html | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182280@lists.php.net to get a copy of this message | ||
--- Andy B <aborka1@wmis.net> wrote:
> hi...
>
> i have the following html line:
> <input type="text" name="referred" value=<?echo
> $old['Referred'];?>
> accesskey="d" id="id-referred">
> the php variable $old['Referred'] was pulled from a mysql table.
> the full string that this variable holds is "I work for you..." but
> when used as a default value in an input text field for html the
> only part that shows up in the form itself is "I". is there
> anything going on that im missing somewhere??
>
>
Yes. Perform the subsitution manually. You'll get
<input type="text" name="referred" value=I work for you...
accesskey="d" id="id-referred">
You need quotes around the PHP code.
<input type="text" name="referred" value="<?echo
$old['Referred'];?>"
accesskey="d" id="id-referred">
=====
Mark Weinstock
mark_weinstock@yahoo.com
***************************************
You can't demand something as a "right" unless you are willing to fight to death to
defend everyone else's right to the same thing.
***************************************
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/