Re: Quotation marks in HTML form values
| From: | Karl DeSaulniers | Date: | Fri, 15 Jun 2012 04:50:44 +0000 |
| Subject: | Re: Quotation marks in HTML form values | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-48310@lists.php.net to get a copy of this message | ||
On Jun 14, 2012, at 11:46 PM, Bastien wrote:
Bastien Koert On 2012-06-15, at 12:35 AM, "Ron Piggott" <ron.piggott@actsministries.orgwrote:You Bastien... you beat me to it.. :) Karl DeSaulniers Design Drumm http://designdrumm.comI have setup the following echo after a database query: <?php echo "<input type=\"text\" name=\"description\" value=\"" . $email_template['description'] . "\" class=\"contact_center_email_template_maintenance_user_input_data\" />\r\n"; ?> What I don’t understand is what to do in the event the variable $email_template['description'] retrieved in the database query contains a quotation mark “ --- In this event only the word “current” populates the “description” field <input type="text" name="description" value="current "Verse of the Day daily devotion" e-mail template" class="contact_center_email_template_maintenance_user_input_data" /> Ron Piggott www.TheVerseOfTheDay.infoWrap the output in htmlspecialchar() -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php