log in system | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

log in system

i make log in system on my web page, then where it saved, and how?

3rd Jan 2017, 10:33 PM
jonayed.neer
8 Answers
+ 3
On a database, which is accesed by a server side language
3rd Jan 2017, 10:52 PM
Nahuel
Nahuel - avatar
+ 2
the form must connect to PHP wich connect to a database where users are stored
3rd Jan 2017, 11:59 PM
Nahuel
Nahuel - avatar
+ 1
i mean just make an html form action is???? (what)
3rd Jan 2017, 11:54 PM
jonayed.neer
+ 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); ?>
4th Jan 2017, 12:00 AM
jonayed.neer
+ 1
i make this one (dbconnect.php) now action>
4th Jan 2017, 12:02 AM
jonayed.neer
+ 1
yeah, but you need to create table users, where will be stored the username and pass. try reading phpmyadmin tutorials
4th Jan 2017, 12:07 AM
Nahuel
Nahuel - avatar
+ 1
tnx
4th Jan 2017, 12:09 AM
jonayed.neer
+ 1
no problem. The code is good, but you will have already created the database and the table even if its empty
4th Jan 2017, 12:15 AM
Nahuel
Nahuel - avatar