Re: Problem with HTML Text box and PHP variable.

From: Date: Thu, 11 Sep 2003 17:33:17 +0000
Subject: Re: Problem with HTML Text box and PHP variable.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-162320@lists.php.net to get a copy of this message
try closing the value sections with single quotes that way the html processiing can see the value it was echo "<td><input type=text name=value".$j.$i." size=20 value=".$myString."></td>"; now is echo "<td><input type=text name=value'".$j.$i."' size=20 value='".$myString."'></td>"; ----- Original Message ----- From: "Golawala, Moiz M (IndSys, GE Interlogix)" <Moiz.Golawala@ge.com> To: <php-general@lists.php.net> Sent: Thursday, September 11, 2003 10:05 AM Subject: [PHP] Problem with HTML Text box and PHP variable. I am having a problem with rendering PHP variables in an HTML text box. If the value of $myString is "Hello" the line below will render it correctly echo "<td><input type=text name=value".$j.$i." size=20 value=".$myString."></td>"; However if the value of $myString is "Hello 1" then the line above will populate the text box with only "Hello" and it will loose the "1" If I change the problem line to the following: echo "<td>".$myString."</td>"; I don't have a problem. "Hello 1" will be rendered correctly. But then I don't have a text box to edit the value. Please help. Thanks Moiz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#162320) next »