RE: [PHP] mysql field getting cut off

From: Date: Fri, 30 May 2003 01:43:56 +0000
Subject: RE: [PHP] mysql field getting cut off
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-149512@lists.php.net to get a copy of this message
> If anyone can help I seem to be stuck on a problem getting a mysql field > inserted correctly. For instance the first page would have a field such > as... > > <input type="text" name="field" size="12"> > > info that is placed into the field is "St. Petersburg, FL" (without the > quotes) > > the php code for the statement... > > $query = "insert into table values( $variable, '$field', $variable2 )"; > > This is where there are 3 fields in the "table" and the second is the one > I > want populated with "St. Petersburg, FL". It ends up with "St." (I'm not > sure if the period makes it). I have verified that the entire statement > arrives at the php script in the variable $field and I have used the mysql > client to give the same command with "St. Petersburg, FL" as the value and > it accepts it without a problem. When you run a SELECT from the command line, do you only see "St." in the column? What kind of column is it? Are you sure it's not fine in the database and you're just showing it like: <input type=text value=$value name=field> which will end up like <input type=text value=St. Petersburg, FL name=field> and will only show "St." in the text box... ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#149512) next »