React Component Nesting and Reusability Explained – A Beginner's Guide 2026

Image
1. Introduction to React Component Nesting and Reusability React JS is a popular JavaScript library used to create interactive and user-friendly web applications. One of the most useful concepts in React development is component-based architecture. Instead of writing an entire website inside one large file, developers divide the user interface into smaller and manageable parts called components. Two important concepts in this approach are component nesting and component reusability. Component nesting means placing one React component inside another component to build a complete user interface. For example, a website page may contain a header, navigation bar, sidebar, content section, and footer. Each section can be developed as a separate component and combined inside a main component. Component reusability means creating a component once and using it multiple times in different parts of an application. For example, the same button, product card, or navigation menu can be reused withou...

how to create login form in php

        

     how to create login form in php 

Registration form  in php






Login Form 

      EXAMPLE :-




<?php
include 'connection.php';
        if(isset($_POST['b1']))
        {
           
            $email = $_POST['uem'];
            $pass = $_POST['upwd'];
    $q="SELECT * FROM userdetails WHERE uem =
'$email' AND upwd ='$pass'";

            $rs = mysqli_query($cn,$q);
            $count = mysqli_num_rows($rs);

                if($count ==1)
                {
                    session_start();//start
            $data = mysqli_fetch_assoc($rs);
                   
      $_SESSION['id'] = $data['uid'];//create
                    echo "<script>
                    alert('login Successfully');
          window.location.href='profile.php';
                    </script>";
                }
                else
                {
                    echo "<script>
                  alert('Invalid Credetials');
                    </script>";
                }

        }

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content=
"width=device-width, initial-scale=1.0">
    <title>User Login</title>
    <link rel="stylesheet"
href="css/bootstrap.css">
</head>
<body class="">

       
   
  <div class="col-md-4 bg-white shadow-lg
mx-auto mt-5
        p-3">
           
        <h1 class="text-center text-primary">
                Login Here
            </h1>

      <form action="login.php" method="post">
           

            <label>Email Address</label>
<input type="email" name="uem" class="
form-control mb-1"
            required>

            <label>Password</label>
            <input type="password" name="upwd"
class="form-control mb-1"
            required>

         
            <div class="text-center">
          <input type="submit" value="Login"
           name="b1" class="btn btn-primary">

  <a href="index.php" class="btn btn-danger">
Create An account ?</a>


                <br>

                <p class="text-center my-3">
                    <a href="forgot-password.php">
                        forgot password ?
                    </a>
                </p>
            </div>
            </form>
        </div>
</body>
</html>

Login Form 


         Output:-

           PHP FORM (USE TO BOOTSTRAP)/output

Note :- data store in the database php


Related Post :-


php program factorial number program

php program to print alphabet pattern B

php for loop

Comments

Popular posts from this blog

CSS Text Color Explained with Syntax and HTML Examples

CSS Outline Offset Property with Practical Examples

Learn CSS text-decoration-color Property in Simple Words with Examples