On Nov 4, 2003, at 6:27 PM, Jay Frumkin wrote:
Hi all,
I am having a bit of a problem, and was wondering if you could help?
Here's the sample code (very simple)
?php
$xyz = Hello World;
echo forminput type=test size=25 value=$xyz/form;
?
The text box shows up with Hello NOT Hello World.
Put quotes around all the values, like:
echo forminput type='test' size='25' value='$xyz'/form;
Martin
-Original Message-
From: Jay Frumkin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 5 November 2003 10:28 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] text input truncated
Hi all,
I am
On Tuesday, November 04, 2003 3:28 PM Jay wrote:
echo forminput type=test size=25 value=$xyz/form;
[snip]
The text box shows up with Hello NOT Hello World. How do I get the
entire variable?
Hi Jay.
You need to wrap the value attribute in quotes, or else it'll truncate
at the first space.
$xyz = Hello World;
echo forminput type=test size=25 value=$xyz/form;
?
The text box shows up with Hello NOT Hello World. How do I get the
entire variable?
I would try single quotes here.
$xyz = 'Hello World';
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Your html is very sloppy actually.
Use:
$xyz = 'Hello World';
echo 'forminput type=text size=25 value='.$xyz.'/form';
- Original Message -
From: Daniel Clark
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 6:49 PM
Subject: Re: [PHP] text
--- Daniel Clark [EMAIL PROTECTED] wrote:
$xyz = Hello World;
echo forminput type=test size=25 value=$xyz/form;
The text box shows up with Hello NOT Hello World. How do I get
the entire variable?
I would try single quotes here.
$xyz = 'Hello World';
That's good advice in general,
6 matches
Mail list logo