RE: [PHP] ptting the variable inside the input

From: Date: Wed, 22 Aug 2007 17:57:31 +0000
Subject: RE: [PHP] ptting the variable inside the input
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-261123@lists.php.net to get a copy of this message
From: "Hulf" <ross@blue-fly.co.uk> This does not work echo $title=$row['title']; echo "<tr><td><input name=\"title\" type=\"text\ value=\"$title\" /></td>"; Ta, R.
I'll pull a Johnny Carson divining moment and say: Did you need the first 'echo'? Does $title need to be set? Try: $title=$row['title']; You missed a double quote after your backslash; the attempt to escape one after 'text' and before 'value': echo "<tr><td><input name=\"title\" type=\"text\" value=\"$title\" /></td>"; Or perhaps use single quotes and don't set $title: echo '<tr><td><input name="title" type="text" value="' . $row['title'] . '" /></td>'; But I like that 4 step approach to addressing a problem and posting a question. Maybe you are using a wireless keyboard which needs batteries or charging or needs to be placed closer to the receiver? You also missed a character in your subject. Unless you just type lazily. _________________________________________________________________ Now you can see trouble…before he arrives http://newlivehotmail.com/?ocid=TXT_TAGHM_migration_HM_viral_protection_0507

« previous php.general (#261123) next »