From 370e8fa0f60dca726e1df2205a34a5518bd5580f Mon Sep 17 00:00:00 2001 From: rpsigh-061194 <73515923+rpsigh-061194@users.noreply.github.com> Date: Tue, 27 Oct 2020 23:12:45 +0530 Subject: [PATCH] Create insert.php data insert in database file --- insert.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 insert.php diff --git a/insert.php b/insert.php new file mode 100644 index 0000000..14ebd5b --- /dev/null +++ b/insert.php @@ -0,0 +1,27 @@ +connect_error) +{ + die("Connection failed: " . $conn->connect_error); +} + +$sql = "INSERT INTO MyGuests (firstname, lastname, email) +VALUES ('rp', 'singh', 'rpsingh@gmail.com')"; + +if ($conn->query($sql) === TRUE) +{ + echo "New record created successfully"; +} +else +{ + echo "Error: " . $sql . "
" . $conn->error; +} + +$conn->close(); +?>