shohan11421

2no

Apr 12th, 2021
571
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 to create table
  15. $sql = "CREATE TABLE zobayer (
  16. id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  17. firstname VARCHAR(30) NOT NULL,
  18. lastname VARCHAR(30) NOT NULL,
  19. email VARCHAR(50),
  20. address VARCHAR(50),
  21. cgpa VARCHAR(50),
  22. )";
  23.  
  24. if ($conn->query($sql) === TRUE) {
  25.   echo "Table MyGuests created successfully";
  26. } else {
  27.   echo "Error creating table: " . $conn->error;
  28. }
  29.  
  30. $conn->close();
  31. ?>
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.

×