why are you sending the $data using both methods GET and POST