Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "";
- // Create connection
- $conn = new mysqli($servername, $username, $password);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $select_db = mysqli_select_db($conn,'akdms_contactdb');
- if (!$select_db) {
- die("Database Selection Failed" . mysqli_error($connection));
- }
- ?>
- <?php
- echo $first_name = "Ankith";
- echo $last_name = "Reddy";
- echo $company_name = "A K Collectives Private Limited";
- echo $postion = "Managing Director";
- echo $email = "ankith.reddy2009@gmail.com";
- echo $phone_number = "8555867870";
- echo $requirement = "Awesome Sauce";
- if($sql = "INSERT INTO `akdms_contactdb`.`akdms_contactus` (`first_name`, `last_name`, `company_name`, `position`, `email`, `phone_number`, `requirement`) VALUES ('Ankith', 'Reddy', 'AK Collectives Private Limited', 'Managing Director', 'ankith.reddy@gmail.com', '8555867870', '100 Tones of Awesome Sauce');")
- { echo "Inserted Successfully";
- } else {
- echo "Insertion Failed";
- };
- ?>
Add Comment
Please, Sign In to add comment