0
7.1kviews
Write a program to accept username and password field from user in form, store and display it using PHP-MySQL.
1 Answer
1
149views
<!DOCTYPE html>
<html>
<head>
<title>PHP Form</title>
</head>
<body>
<?php
if(isset($_POST['submit'])) {
    $servername = "localhost";
$username = "username";
    $password = "password";
$dbname = "myDB";
    // Create connection
    $conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
        die("Connection failed: " . mysqli_connect_error());
    }
    // sql to create table
    $sql …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.