Also, if you need you place such input at frontend I would highly recommend you to use shortcodes. This would allow you to encapsulate all the "magic" in one place, separate PHP and HTM and create reusable elements: http://book.quickappscms.org/developers/shortcode-api.html