tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code05:53

PHP how to insert into MySQL database

Bro Code ↗

From the creator

#PHP #course #tutorial include("database.php"); $username = "Patrick"; $password = "rock3"; $hash = password_hash($password, PASSWORD_DEFAULT); $sql = "INSERT INTO users (user, password) VALUES ('$username', '$hash')"; try{ mysqli_query($conn, $sql); echo"User is now registered"; } catch(mysqli_sql_exception){ echo"Could not register user"; } mysqli_close($conn);

Published 2024-05-20 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code