{"id":14311,"date":"2016-08-08T16:15:46","date_gmt":"2016-08-08T13:15:46","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=14311"},"modified":"2018-01-09T10:46:22","modified_gmt":"2018-01-09T08:46:22","slug":"php-text-area-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/","title":{"rendered":"PHP Text Area Example"},"content":{"rendered":"<p>When building forms, we use text type inputs when we want the user to provide some text. But, for when we expect larger, multi-line texts, we have available the text areas.<br \/>\nIn this example we will see how to deal with these.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n[ulp id=&#8217;8njY7i2QRy6sg8pg&#8217;]<br \/>\n&nbsp;<br \/>\nFor this example, we will use:<\/p>\n<ul>\n<li>Linux Mint (17.03) as Operating System.<\/li>\n<li>Apache HTTP server (2.4.7).<\/li>\n<li>PHP (5.5.9).<\/li>\n<\/ul>\n<div class=\"tip\"><strong>Tip<\/strong><br \/>\nYou may skip environment preparation and jump directly to the <a href=\"#section_2\"><strong>beginning of the example<\/strong><\/a> below.<\/div>\n<h2>1. Preparing the environment<\/h2>\n<p>Below, commands to install Apache and PHP are shown:<\/p>\n<pre class=\"brush:bash\">sudo apt-get update\r\nsudo apt-get install apache2 php5 libapache2-mod-php5\r\nsudo service apache2 restart<\/pre>\n<p><strong>Note:<\/strong> if you want to use Windows, installing XAMPP is the fastest and easiest way to install a complete web server that meets the prerequisites.<\/p>\n<h2 id=\"section_2\">2. HTML form<\/h2>\n<p>Let&#8217;s create a simple form having a text area:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>form.html<\/em><\/span><\/p>\n<pre class=\"brush:html;highlight:[21]\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\u00a0\u00a0 \u00a0&lt;meta charset=\"UTF-8\"&gt;\r\n\u00a0\u00a0 \u00a0&lt;title&gt;PHP Text Area Example&lt;\/title&gt;\r\n\u00a0\u00a0 \u00a0&lt;style&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0.form-input {\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0margin-bottom: 20px;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0}\r\n\u00a0\u00a0 \u00a0&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\u00a0\u00a0 \u00a0&lt;form method=\"POST\" action=\"process.php\"&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;div class=\"form-input\"&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;label for=\"name\"&gt;Your name&lt;\/label&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;input type=\"text\" name=\"name\" id=\"name\" required&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;\/div&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;div class=\"form-input\"&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;label for=\"text\"&gt;Type any text&lt;\/label&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;div&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;textarea name=\"text\" id=\"text\" rows=\"4\" cols=\"35\" required&gt;&lt;\/textarea&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;\/div&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;\/div&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;div&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;input type=\"submit\" value=\"Submit\"&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;\/div&gt;\r\n\u00a0\u00a0 \u00a0&lt;\/form&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>The text areas are handled by the server as same as any other form element, but they are not an <code>input<\/code> element, but they have an &#8220;own&#8221; HTML element, <code>textarea<\/code> (line 21). Regardless this, they also have to have assigned a <code>name<\/code> attribute.<\/p>\n<h2>3. Form handling<\/h2>\n<p>As we have said, the way of dealing with these inputs is the same as with any other. So, a script like the following is enough to process the form data:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>process.php<\/em><\/span><\/p>\n<pre class=\"brush:php\">&lt;?php\r\n\r\n\/**\r\n\u00a0* Checks if the given parameters are set. If one of the specified parameters\r\n\u00a0* is not set, die() is called.\r\n\u00a0*\r\n\u00a0* @param $parameters The parameters to check.\r\n\u00a0*\/\r\nfunction checkPOSTParametersOrDie($parameters) {\r\n\u00a0\u00a0\u00a0 foreach ($parameters as $parameter) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 isset($_POST[$parameter]) || die(\"'$parameter' parameter must be set.\");\r\n\u00a0\u00a0\u00a0 }\r\n}\r\n\r\n\/\/ Flow starts here.\r\n\r\ncheckPOSTParametersOrDie([\r\n\u00a0\u00a0 \u00a0'name',\r\n\u00a0\u00a0 \u00a0'text'\r\n]);\r\n\r\n$name = $_POST['name'];\r\n$text = $_POST['text'];\r\n\r\necho 'You have submitted the form with the following data:&lt;br&gt;';\r\necho '&lt;ul&gt;';\r\necho \"&lt;li&gt;&lt;b&gt;Name:&lt;\/b&gt; $name&lt;\/li&gt;\";\r\necho \"&lt;li&gt;&lt;b&gt;Text:&lt;\/b&gt; $text&lt;\/li&gt;\";\r\necho '&lt;\/ul&gt;';<\/pre>\n<p>Easy, right? The output generated by this file will be similar to the following:<\/p>\n<blockquote><p>You have submitted the form with the following data:<\/p>\n<ul>\n<li><strong>Name:<\/strong> Julen<\/li>\n<li><strong>Text:<\/strong> a random text.<\/li>\n<\/ul>\n<\/blockquote>\n<h2>4. Warning: this form is insecure<\/h2>\n<p>In fact, this is applicable to any type of text input, not only to text areas, but is worth mentioning here, since we are speaking about text inputs.<\/p>\n<p>This form is vulnerable to XSS attacks. Try to submit the form with a value similar to the following (for any of the inputs):<\/p>\n<pre class=\"brush:html\">&lt;script&gt;alert(1)&lt;\/script&gt;<\/pre>\n<p>You would see that the browser is actually executing the code:<\/p>\n<figure style=\"width: 466px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/xss.jpg\" width=\"466\" height=\"331\" \/><figcaption class=\"wp-caption-text\">1. XSS attack example.<\/figcaption><\/figure>\n<p>That is, <strong>an attacker could execute arbitrary code<\/strong> with our form. This &#8220;attack&#8221; seems harmless, but, <strong>in the worst of the cases, an attacker could use this form for hijacking sessions<\/strong>.<\/p>\n<p>Fortunately, fixing this scary vulnerability in this form is pretty simple. Escaping the HTML metacharacters would be enough. This is achieved with <code>htmlentities<\/code>() function. This function will convert the evil input we have seen above, to the following:<\/p>\n<pre class=\"brush:html\">&lt;script&gt;alert(1)&lt;\/script&&gt;<\/pre>\n<p>Converting the HTML metacharacters to HTML entities.<\/p>\n<p>So, we only have to change the lines where we retrieve the parameters:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>process.php<\/em><\/span><\/p>\n<pre class=\"brush:php\">\/\/ ...\r\n\r\n$name = htmlentities($_POST['name']);\r\n$text = htmlentities($_POST['text']);\r\n\r\n\/\/ ...<\/pre>\n<p>And the form would behave as expected:<\/p>\n<figure style=\"width: 463px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/xss-fix.jpg\" width=\"463\" height=\"188\" \/><figcaption class=\"wp-caption-text\">2. Fixed XSS vulnerability.<\/figcaption><\/figure>\n<h2>5. Summary<\/h2>\n<p>This example has shown how to manage the <code>textarea<\/code> HTML element, which actually does not differ from other form elements, seeing also how to handle securely the form data to avoid XSS attacks (which is applicable to other text inputs, not only text areas).<\/p>\n<h2>6. Download the source code<\/h2>\n<p>This was an example of text areas with PHP.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/PHPTextAreaExample.zip\"><strong>PHPTextAreaExample<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>When building forms, we use text type inputs when we want the user to provide some text. But, for when we expect larger, multi-line texts, we have available the text areas. In this example we will see how to deal with these. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [ulp id=&#8217;8njY7i2QRy6sg8pg&#8217;] &nbsp; For this &hellip;<\/p>\n","protected":false},"author":160,"featured_media":930,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[176,184],"class_list":["post-14311","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-form","tag-textarea"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP Text Area Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"When building forms, we use text type inputs when we want the user to provide some text. But, for when we expect larger, multi-line texts, we have\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP Text Area Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"When building forms, we use text type inputs when we want the user to provide some text. But, for when we expect larger, multi-line texts, we have\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-08T13:15:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-09T08:46:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/php-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Toni\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Toni\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/\"},\"author\":{\"name\":\"Toni\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/54a7be647b0b871cff41cbf3d2a95966\"},\"headline\":\"PHP Text Area Example\",\"datePublished\":\"2016-08-08T13:15:46+00:00\",\"dateModified\":\"2018-01-09T08:46:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/\"},\"wordCount\":500,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/php-logo.jpg\",\"keywords\":[\"form\",\"textarea\"],\"articleSection\":[\"PHP\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/\",\"name\":\"PHP Text Area Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/php-logo.jpg\",\"datePublished\":\"2016-08-08T13:15:46+00:00\",\"dateModified\":\"2018-01-09T08:46:22+00:00\",\"description\":\"When building forms, we use text type inputs when we want the user to provide some text. But, for when we expect larger, multi-line texts, we have\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/php-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/php-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/php\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"PHP Text Area Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/54a7be647b0b871cff41cbf3d2a95966\",\"name\":\"Toni\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g\",\"caption\":\"Toni\"},\"url\":\"https:\/\/www.webcodegeeks.com\/author\/julen-pardo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP Text Area Example - Web Code Geeks - 2026","description":"When building forms, we use text type inputs when we want the user to provide some text. But, for when we expect larger, multi-line texts, we have","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/","og_locale":"en_US","og_type":"article","og_title":"PHP Text Area Example - Web Code Geeks - 2026","og_description":"When building forms, we use text type inputs when we want the user to provide some text. But, for when we expect larger, multi-line texts, we have","og_url":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2016-08-08T13:15:46+00:00","article_modified_time":"2018-01-09T08:46:22+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/php-logo.jpg","type":"image\/jpeg"}],"author":"Toni","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Toni","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/"},"author":{"name":"Toni","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/54a7be647b0b871cff41cbf3d2a95966"},"headline":"PHP Text Area Example","datePublished":"2016-08-08T13:15:46+00:00","dateModified":"2018-01-09T08:46:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/"},"wordCount":500,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/php-logo.jpg","keywords":["form","textarea"],"articleSection":["PHP"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/","url":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/","name":"PHP Text Area Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/php-logo.jpg","datePublished":"2016-08-08T13:15:46+00:00","dateModified":"2018-01-09T08:46:22+00:00","description":"When building forms, we use text type inputs when we want the user to provide some text. But, for when we expect larger, multi-line texts, we have","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/php-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/php-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/php\/php-text-area-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"PHP","item":"https:\/\/www.webcodegeeks.com\/category\/php\/"},{"@type":"ListItem","position":3,"name":"PHP Text Area Example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/54a7be647b0b871cff41cbf3d2a95966","name":"Toni","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g","caption":"Toni"},"url":"https:\/\/www.webcodegeeks.com\/author\/julen-pardo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/14311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/160"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=14311"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/14311\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/930"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=14311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=14311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=14311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}