+ 1
log in system
i make log in system on my web page, then where it saved, and how?
8 Answers
+ 3
On a database, which is accesed by a server side language
+ 2
the form must connect to PHP wich connect to a database where users are stored
+ 1
i mean just make an html form action
is???? (what)
+ 1
<?php
$servername = "localhost"; // Example localhost for example
$username = "root"; // Username Of database
$password = ""; //password defined to the user
// Create connection
$conn = mysqli_connect($servername, $username, $password);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully"."<hr>";
// Create database
$sql = "CREATE DATABASE dbname"; //Name of database
if (mysqli_query($conn, $sql)) {
echo "Database created successfully";
} else {
echo "Error creating database: " . mysqli_error($conn);
}
// Close connection
mysqli_close($conn);
?>
+ 1
i make this one (dbconnect.php) now action>
+ 1
yeah, but you need to create table users, where will be stored the username and pass.
try reading phpmyadmin tutorials
+ 1
tnx
+ 1
no problem. The code is good, but you will have already created the database and the table even if its empty