shohan11421

3no

Apr 12th, 2021
747
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  <?php
  2. $servername = "localhost";
  3. $username = "root";
  4. $password = "root";
  5. $dbname = "sectionN";
  6.  
  7. // Create connection
  8. $conn = new mysqli($servername, $username, $password, $dbname);
  9. // Check connection
  10. if ($conn->connect_error) {
  11.   die("Connection failed: " . $conn->connect_error);
  12. }
  13.  
  14. $sql = "INSERT INTO zobayer (firstname, lastname, email, address, cgpa)
  15. VALUES ('Shohanur', 'Rahman', 'shohan@gmail.com', 'kushtia', '3.7');";
  16. $sql .= "INSERT INTO zobayer (firstname, lastname, email, address, cgpa)
  17. VALUES ('Nabil', 'Hayat', 'nabil@gmail.com', 'kushtia', '3.8');";
  18. $sql .= "INSERT INTO zobayer (firstname, lastname, email, address, cgpa)
  19. VALUES ('Hridoy', 'Shom', 'hridoy@gmail.com', 'khulna', '3.8')";
  20. $sql .= "INSERT INTO zobayer (firstname, lastname, email, address, cgpa)
  21. VALUES ('Fahim', 'Rahman', 'fahim@gmail.com', 'Dhaka', '4.00')";
  22. $sql .= "INSERT INTO zobayer (firstname, lastname, email, address, cgpa)
  23. VALUES ('Shykat', 'Emam', 'shykat@gmail.com', 'Dhaka', '3.7')";
  24.  
  25. if ($conn->multi_query($sql) === TRUE) {
  26.   echo "New records created successfully";
  27. } else {
  28.   echo "Error: " . $sql . "<br>" . $conn->error;
  29. }
  30.  
  31. $conn->close();
  32. ?>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×