redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

problems with a php part


Goto page 1, 2  Next
 
Post new topic   Reply to topic    Web Design Forums -> HTML forum
View previous topic :: View next topic  
Author Message
Roombor



Joined: 02 Jun 2006
Posts: 111
Is a html/php type question ok here?
  Reply with quote


Klimapol



Joined: 27 May 2006
Posts: 134
Sure feel free to ask
  Reply with quote
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?
  Reply with quote
ovigo22



Joined: 15 May 2006
Posts: 130
you didnt quote the value
<option value=user name>
Is what it will be right now :)
  Reply with quote
Roombor



Joined: 02 Jun 2006
Posts: 111
Ahh soo '<option value="'.$row['username'].'">
  Reply with quote
ovigo22



Joined: 15 May 2006
Posts: 130
Yep
Also $row[userid] and $row[username] quote those keys :)
  Reply with quote
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 ;)
  Reply with quote
ovigo22



Joined: 15 May 2006
Posts: 130
Hehe yeah :)
Maybe look into a template engine
Makes your code a lot cleaner
  Reply with quote
Roombor



Joined: 02 Jun 2006
Posts: 111
Really? Have a link?
I'm using UltraEdit which really isn't to intuitive.
  Reply with quote
ovigo22



Joined: 15 May 2006
Posts: 130
Http://smarty.php.net/crashcourse.php
Basically it means that you sepearte your php code and your html
  Reply with quote
Page 1 of 2 Goto page 1, 2  Next
Post new topic   Reply to topic    Web Design Forums -> HTML forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group