# Filling Form fields - data cuts off at quotation marks

**URL:** <https://forum.kirupa.com/t/filling-form-fields-data-cuts-off-at-quotation-marks/259667>\
**Category:** programming\
**Created:** [May 7, 2008, 4:19pm UTC](https://forum.kirupa.com/t/filling-form-fields-data-cuts-off-at-quotation-marks/259667 "2008-05-07T16:19:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![charles\_i](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/charles_i/32/2986_2.png) [@charles\_i](https://forum.kirupa.com/u/charles_i)\
**Post date:** [May 7, 2008, 4:19pm UTC](https://forum.kirupa.com/t/filling-form-fields-data-cuts-off-at-quotation-marks/259667/1 "2008-05-07T16:19:09Z")

</div>

I am trying to create a content management tool for a PHP/mySql database of articles and I’m getting very strange results when I mix PHP with HTML - I understand the reason - the HTML forms are reading the PHP tags.

When I try to write (with echo) back into the article submit form the characters either cut off at a quotation mark - or write the rest of the content outside the form input boxes.

For example, this works for entry but I have removed the closing input tags because otherwise they get written to the content:

```auto
echo '<input name="sectionid" type="hidden" value="'.$article['id'].'</input>';
echo '<option name="section_id" value='.$article['section_id'].'</option></td><td>';    

```

When writing content to my page that will assign article order I have to use the above structure - it works with data that begins with an HTML tag (like \<p\>) but if I remove the tag from the start of the data the corresponding form field is blank.

Is there a tutorial somewhere showing a working syntax?

Thanks  
Charles

---

<div class="post-metadata">

**Author:** ![djheru](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/djheru/32/3190_2.png) [@djheru](https://forum.kirupa.com/u/djheru)\
**Post date:** [May 13, 2008, 7:17pm UTC](https://forum.kirupa.com/t/filling-form-fields-data-cuts-off-at-quotation-marks/259667/2 "2008-05-13T19:17:16Z")

</div>

The first line should be

```php
echo '<input name="sectionid" type="hidden" value="'.$article['id'].'" />';

```
