Re: show data on the text input box
| From: | Jim Giner | Date: | Fri, 09 May 2014 22:19:41 +0000 |
| Subject: | Re: show data on the text input box | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323259@lists.php.net to get a copy of this message | ||
On 5/9/2014 6:12 PM, iccsi wrote:
Thanks for the information and help, I use the following code to show data, but it shows '/', but not data. <td><input name="mytext" type="text" value=<?php echo ($row['invdate']); ?> /></td> Are there any way to access from mySQL result data? Thanks again for helping, Regards, Iccsi, "Robert Cummings" wrote in message news:536C7208.6050201@interjinn.com... On 14-05-09 12:37 AM, iccsi wrote:<? echo "<td><input name='mytext' type='text' value='{$row[\'invdate\']}'>"; ?> (Not sure you need the \ inside the [] on the $row reference, but I put them there.)I have following code to connect MySQL and database. I see 'connected to database', I would like to know that which code do I need to show my data on the text box? Your help and information is great appreciated,Do you mean like the following? <input name="mytext" type="text" value="<?php echo htmlspecialchars( $value ); ?>" /> Cheers, Rob. You have no quotes on your value clause. Plus this might be easier to type and read: