PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
schneiderj
Forum Newbie
Posts: 11 Joined: Tue Mar 15, 2005 4:36 am
Post
by schneiderj » Fri Apr 08, 2005 3:51 pm
Hello !
I have a probleme with the the following code :
Code: Select all
<html><body>
<?php
$Nom = "Louis Marie";
?>
<input name="nom" type="text" size="80" value=<?php echo $Nom; ?>>
</body></html>
when I point my browser to this page I have only the truncated name in the input field (only Louis)...
Where is the error ?
Thanks for your help,
Jean-Marie
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Fri Apr 08, 2005 4:38 pm
i dont see any error, but maybe im blind. your problem is that it only displays Louis in the text field not Louis Marie??
try echoing $Nom out right after you set it and see what happens.
maybe do
Code: Select all
<input name="nom" type="text" size="80" value="<? echo $Nom; ?>">
just a guess.
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Fri Apr 08, 2005 5:45 pm
Shiz is correct. Having whitespace in an attribute value with no quotes is a no go. The second word reads like it should be an attribute in itself
schneiderj
Forum Newbie
Posts: 11 Joined: Tue Mar 15, 2005 4:36 am
Post
by schneiderj » Sat Apr 09, 2005 1:11 am
Thank you for your reply.
I try your solution and that did not till work
. I have a look at the code in the browser and I have this :
Code: Select all
<input name="e;nom"e; size="e;80"e; value="e;Louis"e; Marie="e;"e; type="e;text"e;>
Marie is a new parameter of input
. What can I do ?
schneiderj
Forum Newbie
Posts: 11 Joined: Tue Mar 15, 2005 4:36 am
Post
by schneiderj » Sat Apr 09, 2005 2:59 am
Sorry that solution work...
Thank you for your help
.
Jean-Marie