I have a php form and i need 4 field data to be submitted.
- Name
- Password
- Mobile
Now i have to check if all the above data is available or not.
For debugging purpose i am use $_GET below
if (!empty($_GET['name']) or !empty($_GET['email']) or !empty($_GET['password']) or !empty($_GET['mobile'])) {
$response = array(
'status' => 'OK',
'error' => '1',
'message' => 'Registered successfully. Please check your email for activation details',
'data' => '');
} else {
$response = array(
'status' => 'NOK',
'error' => '1',
'message' => 'There was some error please try again.',
'data' => '');
}
The above is not able to validate the form properly.