Welcome Guest, Not a member yet? Register   Sign In
custom form validation
#5

[eluser]andieevans[/eluser]
Hi

I have looked at your code, and can't see where you are using $fieldvalue? is the value of $fieldvalue passed to $uid?, the call to the function only has one property whereas your function has 2 properties?

is $fieldvalue a codeigniter 'default' ?


Code:
public function count_records($fieldvalue, $uid)
{
  $q = $this->db->query("SELECT * FROM mytable WHERE userid = ".$uid );
  $c = $q->num_rows();
  
  if ($c > 19)
   return false;
  else
   return true;
  
}


Messages In This Thread
custom form validation - by El Forum - 07-11-2012, 09:08 AM
custom form validation - by El Forum - 07-11-2012, 10:01 AM
custom form validation - by El Forum - 07-12-2012, 08:02 AM
custom form validation - by El Forum - 07-12-2012, 09:30 AM
custom form validation - by El Forum - 07-12-2012, 11:16 AM
custom form validation - by El Forum - 07-12-2012, 11:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB