
<?php
/*
include "classes/class.phpmailer.php";
$mail = new PHPMailer; 
$mail->IsSMTP();
$mail->SMTPSecure = 'ssl'; 
$mail->Host = "mail.by-arsolution.com"; //host masing2 provider email
$mail->SMTPDebug = 2;
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->Username = "info@by-arsolution.com"; //user email
$mail->Password = "armail2023"; //password email 
$mail->SetFrom("register@by-arsolution.com","AR Care"); //set email pengirim
$mail->Subject = "Testing"; //subyek email
$mail->AddAddress("simetris_id@yahoo.co.id","Ubaidillah");  //tujuan email
$mail->MsgHTML("Testing...");
*/
/*
if($mail->Send()) echo "Message has been sent";
else echo "Failed to sending message";
*/
?>
<html>
    <script src="care/assets/vendors/jquery/jquery-3.4.1.js"></script>

    <body>
        <input id="cari" type="search" placeholder="Input text">
        <div id="test">test</div>
        
        <button onclick="saveData()">Save Data</button>
        <button onclick="getData()">Read Local Storage Data</button>
        <button onclick="clearData()">Clear Local Storage</button>
        <button onclick="removeData()">Remove Local Storage</button>
        
        <!--button onclick="sendMail()">Test Send email</button-->
    </body>
</html>

<script>
    document.getElementById("cari").addEventListener("input",function(e){
        if(e.target.value === ''){
        alert(e.target.value);
        }
    });

    function saveData(){
        localStorage.setItem('quantity',"100");
        localStorage.setItem('price',"100.000");
        alert("Data Saved");
    }    
    function getData(){
        let dataTest = localStorage.getItem('quantity');
        alert(dataTest);
    }
    
    function clearData(){
        localStorage.clear();
        alert('Clear Data Complete!');
    }
    function removeData(){
        localStorage.removeItem("quantity");
        alert('Clear Data Complete!');
    }
    
    /*
    function sendMail(){
        
        $.ajax({
            url: `test-mail/${'recipient1'}`,
            type: 'GET',
            cache: false,
            success:function(response)
            {
                console.log('Hasil:' + response.message);
            }
        });
    }*/

</script>