Posts
Showing posts from March, 2023
php cookie
- Get link
- X
- Other Apps
<?php session_start (); include ( 'phpconnectivity.php' ); $nm = $_REQUEST [ 'nm' ]; $_SESSION [ 'username' ]= $nm ; $pwd = $_REQUEST [ 'pwd' ]; $button = $_REQUEST [ 'bt' ]; $ck = $_REQUEST [ 'ck' ]; if ( isset ( $button )){ $query = "select * from userinfo where name='{ $nm }' and pass='{ $pwd }'" ; $r = mysqli_query ( $con , $query ); $r_count = mysqli_num_rows ( $r ); echo $r_count ; if ( $r_count > 0 ){ if (! empty ( $ck )){ setcookie ( "loginuser" , $nm , time ()+( 1 * 60 * 60 )); setcookie ( "loginpassword" , $pwd , time ()+( 1 * 60 * 60 )); } ...
role based authentication route guard[Angular]
- Get link
- X
- Other Apps
1:Guard are used to restrict the menu navigation 2: for authorization we can have n number of route guard 3:command ng g g<guard name> 4:we can use service in guard guard can be: can Active can ActiveChild can Deactivate can Load https://www.telerik.com/blogs/angular-basics-canactivate-introduction-routing-guards#:~:text=Angular%20route%20guards%20are%20interfaces,%2C%20CanLoad%2C%20CanDeactivate%20and%20Resolve.
module and Group routing angular13
- Get link
- X
- Other Apps
If there are n no of module then:---- 1:--create a module with routing ng g m Admin --routing create component inside it:-- ng g c Admin/list ng g c Admin/login inside routing file: const routes : Routes = [ { path : "list" , component : ListComponent }, { path : "login" , component : LoginComponent } ]; inside AppComponent.html: < ul > < li > < a routerLink = 'list' > list </ a > </ li > < li > < a routerLink = "login" > login </ a > </ li > </ ul > < router-outlet ></ router-outlet > inside app.module.ts: import[] section AdminModule , AdminRoutingModule note: like we have customer module if there are also the same component and same link then how it is possible to dif...
responsive grid
- Get link
- X
- Other Apps
1:- <! DOCTYPE html > < html lang = "en" > < head > < meta charset = "UTF-8" > < meta http-equiv = "X-UA-Compatible" content = "IE=edge" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title > Document </ title > < style > * { margin : 0px ; padding : 0px ; box-sizing : border-box ; } .container { /* width: 500px; */ height :...