in reply to mysql no records after space

Hello again - thanks for the input so far. Yes I realise my code is not good - loooong way to go....... Here is the print portion
sub print_output{ print<<HTML; <HTML><HEAD><TITLE>Modify 1 Script</TITLE></HEAD> <BODY BGCOLOR="#F1EDD3"> <FORM ACTION="modify2.cgi?$saved" METHOD="Post"> <CENTER><FONT SIZE=6 FACE=ARIAL>Modify Record</FONT></CENTER> <HR WIDTH=80%> <P> <CENTER><TABLE BORDER=1 CELLSPACING=0> <TR> <TD BGCOLOR="#D7D3B9" COLSPAN=2><FONT FACE=ARIAL SIZE="4"> <CENTER>ebme modify form</CENTER> </FONT></TD> </TR> <TR> <TD BGCOLOR="#D7D3B9"> <FONT FACE=ARIAL SIZE="2"><B>Comp Name:</B></FONT> </TD> <TD><INPUT TYPE=TEXT SIZE=32 NAME="comp" VALUE=$comp></TD> </TR> <TR> <TD BGCOLOR="#D7D3B9"> <FONT FACE=ARIAL SIZE="2"><B>Device type:</B></FONT> </TD> <TD><INPUT TYPE=TEXT SIZE=32 NAME="device" VALUE=$device></TD> </TR> <TR> <TD BGCOLOR="#D7D3B9"> <FONT FACE=ARIAL SIZE="2"><B>Model Name:</B></FONT> </TD> <TD><INPUT TYPE=TEXT SIZE=32 NAME="model" VALUE="$model"></TD> </TR> <TR> <TD BGCOLOR="#D7D3B9" COLSPAN=2><CENTER><INPUT TYPE=SUBMIT VALUE= +"Modify Record"></CENTER></TD> </TR> </TABLE></CENTER> <P> <HR WIDTH=80%> <P> <CENTER> <FONT SIZE=4 FACE=ARIAL> <A HREF="../../search.htm">Main Page</A> </FONT> </CENTER> </FORM> </BODY></HTML> HTML } # End

Replies are listed 'Best First'.
(bbfu) (sql-html-printing problems) Re(2): mysql no records after space
by bbfu (Curate) on Sep 06, 2001 at 20:03 UTC

    Quoth your code:

         <TD><INPUT TYPE=TEXT SIZE=32 NAME="comp" VALUE=$comp></TD>

    The reason it is only displaying up to the first space is that you are not putting quotes around $comp (et al.) when you specify it as the VALUE. Thus, everything after the first space gets interpreted by the web browser as further properties of the <INPUT> tag (ie, it becomes: <TD><INPUT TYPE=TEXT SIZE=32 NAME="comp" VALUE=THIS IS THE RECORD></TD>, with IS, THE, and RECORD all being value-less properties to the tag, which are silently ignored). Put quotes around them and it should work.

    bbfu
    Seasons don't fear The Reaper.
    Nor do the wind, the sun, and the rain.
    We can be like they are.

      Thank you, Thank you, Thank you - oh great enlightened BBFU I stared at that for so long..... And - STUPIDLY - I did have the quotes around $model !!! Sometimes you really can't see the wood for the trees... Thanks again - your a mate! d. Thanks to all for the input and TIMTOWTDI for the comments - as an amateur - I have started off with too many bad habits. I'm going to put them in check before they get out of hand!