<?php 
session_start();

	if(isset($_POST['boton'])){

	  $boton =$_POST['boton'];

	  switch ($boton) {
	  	case 'Accesar':

	            $password = $_POST['password'];
	            $email = $_POST['mail'];
	            $status= strtolower($password) =='sicanet' && strtolower($email) == 'sicanet';

	            if($status){

	            	$_SESSION['nombre_usuario'] = $email;
		            $_SESSION['usuario_autenticado'] = 'AUTENTICADO';

	        		header('Location: index.php');

	            }else{
	            	header('Location: auth.php?action=fail');
	            }

	            
	  		break;
	  }


	}
	
	
 ?>