<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {

    include('connection.php');

    $company_name = $_POST["company_name"];
    $company_website = $_POST["company_website"];
    $concern_person = $_POST["concern_person"];
    $contact_number = $_POST["contact_number"];
    $email = $_POST["email"];
    $service = $_POST["service"];
    $rate = $_POST["rate"];
    $service_url = $_POST["service_url"];
    $Username = $_POST["Username"];
    $password = $_POST["password"];
    $currentDateTime = date('Y-m-d H:i:s');
 
    $sql = "INSERT INTO add_panel (company_name,company_website,concern_person,contact_number,email,service,rate,service_url,Username,password,datetime) VALUES ('$company_name', '$company_website', '$concern_person','$contact_number','$email','$service','$rate','$service_url','$Username','$password','$currentDateTime')";

    // Execute the query
    if ($conn->query($sql) === TRUE) {
        // echo "Record inserted successfully.";
        header("Location: other-panles.php?success=Panles Added Successfully!!!");
        exit(); 

    } else {
        echo "Error: " . $sql . "<br>" . $conn->error;
    }

    // Close the database connection
    $conn->close();
}
?>