Myvideo

Guest

Login

PHP insert into MySQL database

Uploaded By: Myvideo
1 view
0
0 votes
0

#PHP #course #tutorial include(““); $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);

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later