Please I need help identifying the problem with my query here:
So this is my hard-coded data because I am trying to test my PHP script on its own with out the android application that usually sends data to it.
I have this array of hardcoded data.
$register_data = array(
'username' => 'david',
'password' => 'david',
'first_name' => 'david',
'last_name' => 'david',
'email' => 'david@yahoo.com'
);
This is my problematic query:
"SELECT * FROM `user_info` WHERE `email` = '$register_data['email']' OR `username` = '$register_data['username']'";
And this is the error i received:
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /home1/ifedavid/public_html/androidconnect/register.php
Please is there something I'm doing wrong? Thanks for the help in advance.