CodeIgniter Forums
Form validation returning FALSE - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Form validation returning FALSE (/showthread.php?tid=69157)

Pages: 1 2


RE: Form validation returning FALSE - gmgj - 04-30-2019

As my stomach turns, I found my problem and have a fix.  1) the request method being GET was from the browser requesting the original get for the CI controller file.  When I looked at the results in the browser debug, I was seeing a 404 for the action of the post.  In my old config, somehow I got a rewrite of the FORM post action.  No so with this stack.

So I changed this 
<form action="{site_url}/admin/Log_in" method="post">

to this
<form action="{site_url}/index.php/admin/Log_in" method="post">

and I not longer got 404 on finding the action of the post.

One of the things I noticed while I was trying a LOT of things to get around this is

\system\libraries\Form_validation.php

does a 

$this->CI =& get_instance();
in the constructor and many of the functions return $this.

The makes the return rather large, and redundant and circular.


RE: Form validation returning FALSE - dave friend - 05-01-2019

(04-30-2019, 03:48 PM)gmgj Wrote: $this->CI =& get_instance();
in the constructor and many of the functions return $this.

The makes the return rather large, and redundant and circular.

Actually, it's not really large. The return is a reference which (more or less) uses only enough memory to hold a memory address. The debugger is confused and makes it look huge. It's only circular in that it appears to be copied. It's kind of like when you have two mirrors facing each other. There aren't really thousands of rooms inside each other, merely reflections of reflections going on forever.