| View previous topic :: View next topic |
| Author |
Message |
Roombor
Joined: 02 Jun 2006 Posts: 111
|
| Is a html/php type question ok here? |
| |
|
|
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| Sure feel free to ask |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
Thanks
I am filling in a select field in a form using the results from a sql query and filling it in like this:
Echo '<option value='.$row['username'].'>'.$row[userid].','.$row[username].'</option>';
When I post it into the next form I display it like this: Information for <U>'.$_POST['username'].'</U></span></p>';
For some reason it truncates at the first space in the username field
Although it displays in the select box exactly right
So "Mr Ed" would be "Mr" on the second form
Realized I broke the rules
Is their a prefered clipboard site? |
| |
|
|
ovigo22
Joined: 15 May 2006 Posts: 130
|
you didnt quote the value
<option value=user name>
Is what it will be right now :) |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
| Ahh soo '<option value="'.$row['username'].'"> |
| |
|
|
ovigo22
Joined: 15 May 2006 Posts: 130
|
Yep
Also $row[userid] and $row[username] quote those keys :) |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
| Wow thanks, can't believe I missed that...hard to keep track of all the quotes when doing php ;) |
| |
|
|
ovigo22
Joined: 15 May 2006 Posts: 130
|
Hehe yeah :)
Maybe look into a template engine
Makes your code a lot cleaner |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
Really? Have a link?
I'm using UltraEdit which really isn't to intuitive. |
| |
|
|
ovigo22
Joined: 15 May 2006 Posts: 130
| |
| Page 1 of 2 |
Goto page 1, 2 Next |
|