trim()

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

Post Reply
User avatar
boo_lolly
Forum Contributor
Posts: 154
Joined: Tue Nov 14, 2006 5:04 pm

trim()

Post by boo_lolly »

my pre-populated input fields are ending the value as soon as it hits a whitespace. for example. one input field that is pre-populated has an address. 1234 SomeStreet, right? well, the input field will only display 1234. is there a way or a function that is the antithesis of trim()? is this how i would fix the problem?
User avatar
Cameri
Forum Commoner
Posts: 87
Joined: Tue Apr 12, 2005 4:12 pm
Location: Santo Domingo, Dominican Republic

Post by Cameri »

:x i don't really understand what you are asking... antithesis of trim()??
Explain yourself better, and show some code of what you are actually trying to do, that way we can understand you and help u out.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

how are you populating the fields? It sounds like something having to do with pulling from a query string maybe? Are you doing this?

Code: Select all

<form>
 <input type="text" name="address" value="<?php echo $_GET['address'] ?>">
</form>
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'll have to guess boo_lolly doesn't have quotes around the value attribute.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

that would be correct... he doesn't I'm almost sure of it, because in his other post, he doesn't quote attributes either and I just whined about it in that thread before coming in here and seeing this problem again (which I had forgot about). Feyd's the man.
Post Reply