Skip to content
This repository has been archived by the owner on Nov 5, 2020. It is now read-only.

pinak3748/PHP-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP Login form

A Simple Login Form developed in PHP and MYSQL with HTML5 Form validation.

whats different

It checks if the username , email and password is valid or not

if (empty($name)) {
        $errorname = "write a valid name you piece of shit";
    } else {
        if (!preg_match("/^[a-zA-Z-' ]*$/", $name)) {
            $errorname = "are you kid of elon musk";
        } else {
            $count = $count + 1;
        }
    }

If all the validation are successful then it connect to your server

It use local xampp server and fetch the data directly to database.

   $conn = mysqli_connect($servername, $username, $password);  
   if (!$conn) {
            die("Connection failed: " . mysqli_connect_error());
        }
  • If the database or table is already created then it will show error.
   echo "error : Database is not connected";  
   echo "Error: " . $sql . "" . mysqli_error($connection);
  • If it show error try changing database name.
 $sql = "CREATE DATABASE myDB";

About

Login form using HTML5,PHP and MYSQL.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages