Advertisement
Guest User

GetJSON

a guest
Feb 7th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. $jsonLog = filter_input(INPUT_POST, 'accederIntranet');
  2. if ($jsonLog !== NULL) {
  3. $getPas = json_decode($jsonLog, true);
  4. $user = $getPas['usuario'];
  5. $pass = $getPas['contrasena'];
  6. $log = getLog(connection(), $user, $pass);
  7. if ($log === 'ok') {
  8. $resultado = 'ok';
  9. }
  10. if ($log !== 'ok') {
  11. $resultado = 'nook';
  12. }
  13. echo ($resultado);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement