Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonvnbb committed Mar 17, 2024
0 parents commit afe28a0
Show file tree
Hide file tree
Showing 5 changed files with 613 additions and 0 deletions.
20 changes: 20 additions & 0 deletions connect.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
$nama = $_POST['Nama'];
$email = $_POST['Email'];
$nophone = $_POST['No_HP'];

//DB
$conn = new mysqli('localhost', 'jhonvnababan', 'jaqsibala19', 'portofolio');
if($conn->connect_error){
die('Connection Failed : '.$conn->connect_error);
} else{
$insert = $conn->prepare("INSERT INTO dbportfolio (Nama, Email, No_HP) VALUES (?, ?, ?)");
$insert->bind_param("ssi", $nama, $email, $nophone);
$insert->execute();
echo "Your message has been successfully sent, I will contact you soon..";
$insert->close();
$conn->close();
}
header("Location: success.html");
exit()
?>
Loading

0 comments on commit afe28a0

Please sign in to comment.