registration and login form in php and mysql with validation code free download step by step.
Table of Contents
Login and Signup form using PHP and MySQL with validation
Step 1 : SQL file: For create table
Sql file
[php]
CREATE TABLE `signup_master` (
`ID` int(10) NOT NULL,
`Member_name` varchar(100) NOT NULL,
`Profile_name` varchar(100) NOT NULL,
`Email` varchar(100) NOT NULL,
`Password` int(100) NOT NULL,
`File` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
[/php]
Step 2 : connecting database
connection.php
[php]
[/php]
Step 3: getting the values from the user
signup_master.php
[php]
[/php]
Step 4: A PHP file that process the signup request
signup_master_a.php
[php]
0)
{
echo “Member Email Id Already Exists”;
exit;
}
else(isset($_POST[‘save’]))
{
$file = rand(1000,100000).”-“.$_FILES[‘file’][‘name’];
$file_loc = $_FILES[‘file’][‘tmp_name’];
$folder=”upload/”;
$new_file_name = strtolower($file);
$final_file=str_replace(‘ ‘,’-‘,$new_file_name);
if(move_uploaded_file($file_loc,$folder.$final_file))
{
$query=”INSERT INTO signup_master(Member_name, Profile_name, Email, Password, File ) VALUES (‘$member_name’, ‘$profile_name’, ‘$email’, ‘md5($pass)’, ‘$final_file’)”;
$sql=mysqli_query($db_config,$query)or die(“Could Not Perform the Query”);
header (“Location: signin.php?status=success”);
}
else
{
echo “Error.Please try again”;
}
}
?>
[/php]
Step 5: getting the values from the user
signin.php
[php]
[/php]
Step 6: signin process to check valid user or not
signinProcess.php
[php]
[/php]
Step 7: welcome page after signin
welcome.php
[php]
[/php]
Step 8: Logout from the application
logout.php
[php]
[/php]