RE: Blanks in PHP

by "Cyanide _7" <leo7278(at)hotmail.com>

 Date:  Wed, 24 May 2000 09:25:22 CDT
 To:  brian(at)livenet.net
 Cc:  hwg-languages(at)hwg.org
  todo: View Thread, Original
without the code to view, this sounds like it might be a quotation problem? 
perhaps php is writing a tag like so:

<option value=my string>foo</option>

in which case the value with only be 'my'. varchar does indeed retain 
spaces, crlf, etc... so i doubt thats the problem. if this isn't the 
problem, post the code. - Cyanide_7


>
>How did you insert the fields into the db????
>
>INSERT INTO tablename VALUES( 'two words', 'three 3 words', '13', '0');
>
>Can you return the correct results when you query the db
>directly from the command line?
>
>Depending on what you applying the output to,
>also look at these 3 php functions:
>htmlentities()
>stripslashes()
>urlencode()
>
>
>-Brian
>**********
>
> > -----Original Message-----
> > From: owner-hwg-languages(at)hwg.org [mailto:owner-hwg-languages(at)hwg.org]On
> > Behalf Of Sue Bailey
> > Sent: Tuesday, May 23, 2000 8:07 PM
> > To: hwg-languages(at)hwg.org
> > Subject: Blanks in PHP
> >
> >
> > Can I just say first of all, thanks for everyone's help in fathoming
> > PHP/mySQL; this list is brilliant! Now, onto today's problem...
> >
> > I'm now adding stuff into my lovely new database (!) and one of
> > the fields I
> > want to be filled via an option list. Most of the entries on this list 
>are
> > one word, but a couple aren't; problem is, when I output the
> > results of the
> > ones with spaces in PHP, it misses out everything after the first space. 
>I
> > tried replacing the space with %20, which it turned into a + ; I tried
> > putting in a + and it just went back to losing everything after
> > the space, I
> > even tried &nbsp; and that turned into a + as well (I think, I'm
> > going a bit
> > cross-eyed by now). This isn't happening with any other type of
> > form field,
> > and it's just ordinary old varchar in the table; and it would be 
>perfectly
> > possible to turn this into a text box....and I would, except it's
> > annoyed me
> > now!
> >
> > Anybody got any idea what I'm doing wrong? (The server's running php3, 
>if
> > that makes any difference.)
> >
> > TIA
> >
> > Sue
> >
> >
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA