Problem: When User enter "Space" in register form , it will still entered into database , how do i prevent it ?
Code I tried: Used trim , but same problem occurred when users only Enter "SPACE", how do i resolve the issue ?
$userName= ($this->input->post("userName"))? trim($this->input->post("userName"), " ") : "NIL";