Posts

Showing posts from October, 2021

important_html_css_for_next_geneartion

 https://icons8.com/icons/set/password

My_Mat_React

  npm install @emotion/react npm install @emotion/styled

mysql

 function f3(){     window.open("A.html","","height=500px,left=200px,top=50px,width=500px"); } mysql:---- sql:---structured query language it allows to access and manipulate data. RDBMS:-- Relational database management system(2 table) architure:-- enrollment table:-- student_enrollno(pk) student_name student_course student_address student table:-- student_enrollno(fk) student_name student_course student_atendance library table:-- student_enrollno(fk)  student_name book_name  book_isue_date join table..... select* from tables... the data in Rdbms  is stored in objects called table. Table:- A table is a collection of related data entries and it consists of columns and rows. sqlqueries:--- DDL:--- data defination language... create,alter,drop DML:-- data manipulation language... insert,update,delete Dcl:-- data control language grant,revoke Tcl:--- transaction control language commit,rollaback,savepoint //......... create database datbasename use databasenam...

ajax_php2

  <?php $con = mysqli_connect ( "localhost" , "root" , "" , "student" ) or die ( "not connected" ); <?php include "sql_connect.php" ; $name = $_REQUEST [ 'nm' ]; $pass = $_REQUEST [ 'pwd' ]; // echo $name; // echo $pass; if ( isset ( $name ) && isset ( $pass )){     $sql_query = "insert into student_record(name,pwd) values('{ $name }','{ $pass }')" ; $query = mysqli_query ( $con , $sql_query ) or die ( "not executing" ); if ( $query ){     echo 1 ; } else {     echo 0 ; } } ? > .................delete................. <?php include "sql_connect.php" ; $nm1 = $_REQUEST [ 'nm' ]; $sql_query = "delete from student_record where name='{ $nm1 }'" ; $query = mysqli_query ( $con , $sql_query ) or die ( "not executing" ); if ( $query ){     echo 1 ; } ? > ..........edit.................. <?php include "...

Ajax_php1

  <! 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 >     < link rel = "stylesheet" href = "style/style.css" >     <!-- <link rel="stylesheet" href="style/style.css?v= <?php echo time (); ? > "> -->     < script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" ></ script > </ head > < body >     < span id = "a" ></ span >     < form id = "F" > < label for = "name" > EnterName </ label > < input type = "text" name = "nm" id = "nm" > < br /> ...

codeIgniter

  Use Images, CSS  https://learningprogramming.net/php-mysql/codeigniter-4/use-images-css-and-javascript-in-codeigniter-4/ and JavaScript in CodeIgniter 4 https://learningprogramming.net/php-mysql/codeigniter-4/use-images-css-and-javascript-in-codeigniter-4/ use-images-css-and-javascript-in-codeigniter-4/ https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css

React js validation

 https://react-hook-form.com/ https://www.youtube.com/watch?v=LIkIM5u1mCk&t=382s npm i  react-hook-form npm i  @hookform/resolvers npm i  yup https://www.youtube.com/watch?v=t2ypzz6gJm0&t=120s https://react-hook-form.com/get-started https://www.youtube.com/watch?v=LIkIM5u1mCk&t=79s https://react-hook-form.com/ use ref hooks:(autofocus) every time when component render useeffect() ref is similar to state that persists b/w your render but diff b/w state and ref is does not cause a component to change most use case of ref: Reference element inside Html. like autofocus... we can use alternate  of onChange.

PHP sql_error

 https://www.youtube.com/watch?v=tDf-QA4vZ2s https://stackoverflow.com/questions/18022809/xampp-mysql-shutdown-unexpectedly while changing the port https://www.youtube.com/watch?v=4o4BABR0Iho

validation

 email validation: function validateEmail ( email ) { const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ ; return re. test ( String (email). toLowerCase ()); } https://stackoverflow.com/questions/19605150/regex-for-password-must-contain-at-least-eight-characters-at-least-one-number-a https://stackoverflow.com/questions/19605150/regex-for-password-must-contain-at-least-eight-characters-at-least-one-number-a https://www.youtube.com/watch?v=wiQSUdJsc-I https://en.wikipedia.org/wiki/Regular_expression Regular Expression. A password is considered valid if all the following constraints are satisfied: It contains at least 8 characters and at most 20 characters. It contains at least one digit. It contains at least one upper case alphabet. It contains at least one lower case alphabet. It contains at least one special character which includes ...

React_js_routing

Image
 without reload page load install: npm i  react-router-dom Everytime when state update component re-render.. https://reactrouter.com/web/guides/quick-start link and Navlink[can apply css] exact is exact match [exact path] switch:-switch to particular route only while error component making. { /* A <Switch> looks through its children <Route>s and renders the first one that matches the current URL. */ } Dynamic:- /post/:cat in post.js :-- import   React   from   'react' import  {  useParams  }  from   'react-router' export   default   function   About () {      let  { cat }= useParams ();    return  (      < div > About page { cat } </ div >   ) } App.js:--- import Nav from './Components/Nav'; import Home from './Components/Home'; import About from './Components/About'; import Contact from './Components/Contact'; import { ...

javascript_loop and methods

A =[ "sameer" , 12 , "gurgram" , 59.98 , 34 ];   A.forEach((e,index,a) => { //     console.log(e+"..."+index+"..."+a); // }); for ( value   of   A ){      console . log ( value ); const   students ={ "name" : "ankit" , "lastname" : "joshi" , "rollno" : 12 , fullname : function (){     console . log ( this . name + "" + this . lastname )     //return this.name+""+this.lastname; } const   user =[ { name : 'ankit' , age : 30 }, { name : 'rajesh' , age : 20 }, { name : 'subham' , age : 40 }, { name : 'rakesh' , age : 32 }, { name : 'priyanshu' , age : 18 }, { name : 'pankaj' , age : 22 } ] result = user . filter (( element ) => element . name . charAt ( 0 )== 'p' ); console . log ( result ); //result=user.reduce((sum,element)=>sum+element.age,0); //console.log(result); // result=user.filter((element)=>element.age...