{"id":763,"date":"2022-08-30T15:06:46","date_gmt":"2022-08-30T15:06:46","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/tank-auth-set_value-undefined-in-register_form-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:06:46","modified_gmt":"2022-08-30T15:06:46","slug":"tank-auth-set_value-undefined-in-register_form-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/tank-auth-set_value-undefined-in-register_form-collection-of-common-programming-errors\/","title":{"rendered":"tank Auth set_value undefined in register_form-Collection of common programming errors"},"content":{"rendered":"<p>I get the following error when click on sign up button.<\/p>\n<p>Fatal error: Call to undefined function set_value() in C:\\wamp\\www\\bdcom\\www\\application\\views\\auth\\register_form.php on line 19<\/p>\n<p>I am new to codeigniter framework.<\/p>\n<p>following is the code in register_form.php<\/p>\n<pre><code>if ($success){\n    echo ''.$success_message.'';\n}else {\n    \/\/show the form\n$use_username = true;\nif ($use_username) {\n    $username = array(\n        'name'  =&gt; 'username',\n        'id'    =&gt; 'username',\n        'value' =&gt; set_value('username'),\n\n        'maxlength' =&gt; $this-&gt;config-&gt;item('username_max_length', 'tank_auth'),\n        'size'  =&gt; 30,\n    );\n}\n<\/code><\/pre>\n<p>And this is how I load register.php in auth.php<\/p>\n<pre><code>$this-&gt;load-&gt;view('auth\/register_form', $data);\n<\/code><\/pre>\n<p>Have loaded the form helper in autoloader as well. Stuck from 3 days tring to figure out what the problem is. Appreciate the help<\/p>\n<p>Thanks<\/p>\n<ol>\n<li>\n<p>Check if your autoload.php has the following, if not add them, its due to form helper not being loaded.<\/p>\n<pre><code>$autoload['helper'] = array('url','form','html');\n<\/code><\/pre>\n<\/li>\n<li>\n<p>In your constructor of your controller write this:<\/p>\n<pre><code>$this-&gt;load-&gt;helper('form');\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-09 22:40:34. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I get the following error when click on sign up button. Fatal error: Call to undefined function set_value() in C:\\wamp\\www\\bdcom\\www\\application\\views\\auth\\register_form.php on line 19 I am new to codeigniter framework. following is the code in register_form.php if ($success){ echo &#8221;.$success_message.&#8221;; }else { \/\/show the form $use_username = true; if ($use_username) { $username = array( &#8216;name&#8217; =&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-763","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/763","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=763"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/763\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}