Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php

use IlluminateHttpRequest;use IlluminateSupportFacadesDB; class Admin_auth extends Controller{    function login_submit(Request $request){		$email=$request->input('email');		$password=$request->input('password'); 		$result=DB::table('users')				->where('email',$email)				->where('password',$password)				->get(); 		if(isset($result[0]->id)){			if($request[0]->status==1){				$request->session()->put('BLOG_USER_ID',$result[0]->id);				return redirect('/admin/post/list'); 			}else{ 				$request->session()->flash('msg','Account Deactivated');				return redirect('admin/login'); 			} 		}else{			$request->session()->flash('msg','Please enter valid login details');			return redirect('admin/login');		} 
            
Source by www.hostwinds.com #
 
PREVIOUS NEXT
Tagged: #php
ADD COMMENT
Topic
Name
3+1 =