web hosting and development forums
Web Design and Development Forums Archive


Index - HTML forum

problems with a php part


Post reply

Is a html/php type question ok here?
Sure feel free to ask
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?
you didnt quote the value <option value=user name> Is what it will be right now :)
Ahh soo '<option value="'.$row['username'].'">
Yep
Also $row[userid] and $row[username] quote those keys :)
Wow thanks, can't believe I missed that...hard to keep track of all the quotes when doing php ;)
Hehe yeah :) Maybe look into a template engine Makes your code a lot cleaner
Really? Have a link? I'm using UltraEdit which really isn't to intuitive.
Http://smarty.php.net/crashcourse.php Basically it means that you sepearte your php code and your html
Nice! thanks, I have seen this king of thing before and it kind of confused me but now that I am a bit more into it I can see it being very usefull
Yet another step closer to perfect code :)
:)




Dubai Forum | Paris Forum | Webmaster Forum | Vegan Forum | Brisbane Forum | 3D Forum | Jobs in Dubai | Jobs in London | London UK Classifieds
Archive script by RedHo.com