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...

php form Handling

 PHP Form Handling

PHP form handling


PHP  form 
       

  • php program use to post method in php


   1] post is used to send data to server to create/update a resource.
   2] The data send to the server with POST is  stored in the request body of the HTTP request

  •  what is action in php

 1] A PHP form action attribute specifies the location to transfer the submitted user information.
  2]  You can configure this device to transfer data to a website or file.
  3] PHP get and php post are global methods 

  •      What is method in php

  1] Methods are used effectively in the class/ object context.
  2] When you create a function outside a class/object , you can call it a function.

 NOTE :-
      only use the HTML TAG

      Example ::-

<!DOCTYPE html>
<html
<head>
   
    <title>Document</title>
   
</head>
<body>
   
 <form action="login.php"method="post">
    <h1> Login Here</h1>
    <label>Email Address</label>
    <input type="email" name="uem"
class="form-control" required><br>

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


        <input type="submit" value="Login"
name="b1">
   
</p>
 
</form>

</body>
</html>

PHP form 

Output ::-

php form output

PHP FORM  

NOTE 

      USE to bootstrap  in PHP FORM 


  WHAT is the bootstrap 

  1]  bootstrap is free.
   2] open source front-end use.
   3] bootstrap is framework for the creation and  responsive websites.
   4]  And create responsive webpage

 

Note :- 

  • First bootstrap file download free
  •  go to the Bootstrap website  and to the download to the file (css in bootstrap include )
  • then this file link to to your login.php (program file name ) 
  • go to the code than <head> tag inclue to the fille


  • code =  this is code
       <head>
        <title>Document</title>
       
    <link rel="stylesheet"
    • href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/
     

    dist/css/bootstrap.min.css"> </head>
 

EXAMPLE 
  PHP FORM (USE TO BOOTSTRAP)

<!DOCTYPE html>
<html lang="en">
<head>
   
    <title>Document</title>
   
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/
bootstrap@4.1.3/dist/css/bootstrap.min.css">

</head>
<body class="bg-primary">
    <div class="col-md-4 mx-auto bg-white
shadow-lg mt-5 p-2">
 <form action="login.php"method="post">
    <h1 class="text-primary text-center">
Login Here</h1>
    <label>Email Address</label>
    <input type="email" name="uem"
class="form-control" required><br>

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

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

    </div>
  </form>
 </div>
   
</body>
</html>

Output 

  PHP FORM (USE TO BOOTSTRAP)

php form Handlinga


Related Post :-

php program to print hollow triangle star pattern

php program to print alphabet pattern F

inline css in html

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