Welcome Guest, Not a member yet? Register   Sign In
using $_post in function
#1

[eluser]trevor2[/eluser]
I can't seem to get this going for some reason.

My error on "line 14" is where the function is declared.
Parse error: parse error, expecting `')'' in C:\xampp\htdocs\CodeIgniter\system\application\controllers\main.php on line 14

Here is the code
Code:
function username_check($_POST['username']); // Line 14
        {
            $str = $_POST['username'];
            $this->load->database();
            $query = $this->db->query('SELECT username FROM ci_members');
            
            if($query->num_rows > 0)
            {
                $this->form_validation->set_message('username_check', 'Please choose another name');
                return FALSE;
            }
            else
            {
                return TRUE;
            }
        }


Messages In This Thread
using $_post in function - by El Forum - 08-15-2009, 10:01 PM
using $_post in function - by El Forum - 08-15-2009, 10:04 PM
using $_post in function - by El Forum - 08-15-2009, 11:43 PM
using $_post in function - by El Forum - 08-16-2009, 01:17 AM
using $_post in function - by El Forum - 08-20-2009, 10:58 PM
using $_post in function - by El Forum - 08-20-2009, 11:20 PM
using $_post in function - by El Forum - 08-20-2009, 11:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB