Re: updateable database- please help- only displaying first word from field

From: Date: Fri, 20 Jun 2003 17:40:50 +0000
Subject: Re: updateable database- please help- only displaying first word from field
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-152330@lists.php.net to get a copy of this message
Thanks! "Matt Hedges" <matt@hedges.org> wrote in message news:20030620173151.34951.qmail@pb1.pair.com... > Hello. I am making an online database of my wines that I want my friends to > be able to edit. The page below displays the wines. I want the fields in > text boxes so later they can be easily edited. However, the text boxes only > display the first word of the field from the database. For example, in the > Name text box, let's say the wine's name is Norton Malbec, it only displays > Norton. Does anyone know how to fix this? > > thanks very much > Matt Hedges > > > > > > <?php > > $db = mysql_connect("host", "username", "pw") > or die ("The Database is momentarily down. Sorry for the delay."); > mysql_select_db("username",$db); > > $sql = "SELECT * FROM wines WHERE id='1'"; > $result = mysql_query($sql); > > echo "<b><u><font face=verdana>Wines in > Database</font></b></u>:<p>\n"; > echo "<table border=1 bgcolor=white valign=top cellspacing=2 > cellpadding=2>\n"; > > while ($row = mysql_fetch_array($result)) > { > extract($row); > echo "<tr bgcolor=3399cc>\n > <td><input type=text name=US value=$US></td>\n > <td><input type=text name=Bodega value=$Bodega></td>\n > <td><input type=text name=Name value=$Name></td>\n > <td><input type=text name=Grape value=$Grape></td>\n > <td><input type=text name=Year value=$Year></td>\n > <td><input type=text name=Region value=$Region></td>\n > <td><input type=text name=SubRegion value=$SubRegion></td>\n > </tr>\n"; > } > echo "</table>\n"; > > ?> > > > > > > > > -- > ___________________________ > | Matt Hedges > | http://hedgesinnovations.com > | > >

« previous php.general (#152330) next »