| 7:53 am on Feb 12, 2004 (gmt 0)|
I'm no expert, but shouldn't you have echo in there?
<input type="text" value="<? echo $value?>"/>
| 12:02 pm on Feb 12, 2004 (gmt 0)|
Vinaya is using the concise echo format, as detailed at the end of example 1 in the PHP docs [php.net].
I don't know how to solve the problem, though 8)
| 1:24 pm on Feb 12, 2004 (gmt 0)|
What exactly is '$value'?
Is this not a problem with the double quotes "" in the $value variable ending the input field?
ie. <input value="This "thing" is red"> would get cut off after 'this'.
<input type="text" value="<?= htmlspecialchars($value)?>">
| 10:40 pm on Feb 12, 2004 (gmt 0)|
I tried using htmlspecialchars, but that doesnt seem to help.
The value of $value is 'Hello there', no double quotes anywhere, only hello is displayed.
I think i need to use a text area instead of a text.
Will tell you the result once i do that.
Thanks for ur suggestions!
| 11:44 pm on Feb 12, 2004 (gmt 0)|
Well that's very strange because everything looks good to me. Hard to tell if it's the php or the html. What does the generated source code look like? When you print the $value is that right before the input tag?
BTW, you should have a name="something" in the input tag as well.
| 11:54 pm on Feb 12, 2004 (gmt 0)|
thanks for that reply..i looked at the source code being generated and realised what was going wrong..
<input type="text" name="cardName" size="30" maxlength="50" value=v nat>
i had value=<?$value?> instead of value="<?$value?>"
thats why it was displaying only the first part.
Thanks for the help.
| 12:02 am on Feb 13, 2004 (gmt 0)|
Cool you got it working! So what you had in your first post is not exactly what you had in your code. Oy!