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
sinewave
Forum Commoner
Posts: 41 Joined: Tue Sep 10, 2002 4:35 pm
Location: Canada
Post
by sinewave » Sun Feb 15, 2004 9:51 pm
I am trying to fill a form from a database search.
Whenever a record has spaces if i try to fill the input form by doing:
Code: Select all
<?php
<input name='example' type='text' size='65' value=".$row["example"].">
?>
It will display the first word and then nothing else. I'm assuming it is because of the spaces. What can i do?
Illusionist
Forum Regular
Posts: 903 Joined: Mon Jan 12, 2004 9:32 pm
Post
by Illusionist » Sun Feb 15, 2004 11:02 pm
this is wrong:
try this instead:
sinewave
Forum Commoner
Posts: 41 Joined: Tue Sep 10, 2002 4:35 pm
Location: Canada
Post
by sinewave » Sun Feb 15, 2004 11:08 pm
actually it isnt wrong. The whole thing is in an echo();
I should have put that.
The code works, it just doesnt work after the first space and i realized why.
I dont have quotes around it. Thanks for your help though.
Illusionist
Forum Regular
Posts: 903 Joined: Mon Jan 12, 2004 9:32 pm
Post
by Illusionist » Sun Feb 15, 2004 11:10 pm
ok, yes you should have included that bit of code... try looking at urlencode() and urldecode()