ok

Mini Shell

Direktori : /home2/selectio/public_html/caliberembedded.com/add-api/
Upload File :
Current File : /home2/selectio/public_html/caliberembedded.com/add-api/user-add.php

<?php  include "../config/config.php";

if(isset($_POST['add_user'])){
        try{

error_log("pafge" );
        $statement = $pdo->prepare("INSERT INTO `tbl_user`(`name`,`email`,`phone`,`address`,`message`) VALUES (?,?,?,?,?)");
            $result=$statement->execute(array($_POST['name'],$_POST['email'],$_POST['phone'],$_POST['address'],$_POST['message']));
                    
                    if($result){
                        $return_arr['message']='Message sended Successfully...';
                        $return_arr['status']=200;    
                    }else{
                        $return_arr['message']='Something Went Wrong..';
                        $return_arr['status']=400;
                    }  
                      echo json_encode($return_arr);
                }catch(Exception $e){
                    $error=$e;
                }   
    }
    
?>


Zerion Mini Shell 1.0