Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-Type: text/html; charset=utf-8');
- $empresa = 'TÉCNICOS GEOLOGÍA, PETRÓLEO, CANCIÓN';
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "papa";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "INSERT INTO empresas (empresa)
- VALUES ('$empresa')";
- if ($conn->query($sql) === TRUE) {
- echo "New record created successfully";
- } else {
- echo "Error: " . $sql . "<br>" . $conn->error;
- }
- $conn->close();
- sleep(0);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement