Wednesday, September 21, 2022

BootStrap and $_POST in PHP

 A simple program to demonstrate bootstrap form and $_POST using PHP programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.

 





Program Listing

index.php

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Input Form in PHP</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="m-4">
    <form action="welcome.php" method="post">
        <div class="col-xs-4"">
            <label class="form-label" for="inputUseranme">Username</label>
            <input type="text" class="form-control" id="inputUsername"  name="username"
            placeholder="Username"  
            required>
        </div>
        <div class="mb-3">
            <label class="form-label" for="inputFirstname">Firstname</label>
            <input type="text" class="form-control" id="firstname" name="firstname"
             placeholder="Firstname" required>
        </div>
        <div class="mb-3">
            <label class="form-label" for="inputLastname">LastName</label>
            <input type="text" class="form-control" id="lastName" name="lastname"
            placeholder="Lastname" required>
        </div>
        <div class="mb-3">
            <label class="form-label" for="inputEmail">Email</label>
            <input type="email" class="form-control" id="inputEmail" name="email"
             placeholder="Email"  
            required>
        </div>
        <div class="mb-3">
            <label class="form-label" for="inputPassword">Password</label>
            <input type="password" class="form-control" id="inputPassword"  name="password"
            placeholder="Password" required>
        </div>
       
        <button type="submit" class="btn btn-primary">Submit</button>
    </form>
</div>
</body>
</html>

welcome.php

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Welcome Page</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body><br>
Username   : <?php echo $_POST["username"]; ?><br>
Firstname  : <?php echo $_POST["firstname"]; ?><br>
Lastname   : <?php echo $_POST["lastname"]; ?><br>
Email      : <?php echo $_POST["email"]; ?><br>
Password   : <?php echo $_POST["password"]; ?>
</body>
</html>

No comments:

Post a Comment