Mini Shell

Direktori : /home/rizant5/public_html_old/
Upload File :
Current File : /home/rizant5/public_html_old/get-subscription.php

<?php

    if(isset($_POST["getSubscribe"])){

        require_once('config.php');

        $name = $_POST["nm"];
        $phone = $_POST["pn"];
        $email = $_POST["em"];
        $courseId = $_POST["courseId"];

        //$conn->query("select * from newsletter where slet_email='$email' ")
        $checkExst = mysqli_query($connt, "SELECT * FROM newsletter WHERE slet_email='".$email."' AND slet_course_id='".$courseId."' OR slet_phone='".$phone."' AND slet_course_id='".$courseId."'");

        $rows = mysqli_num_rows($checkExst);
        if($rows > 0){
            echo "Exist";
        }
        else{
            $inSql = $conn->exec("insert into newsletter(slet_email, slet_date, slet_type, slet_name, slet_phone, slet_course_id) values ('".$email."',now(),'cs','".$name."','".$phone."','".$courseId."') ");

            if($inSql){
                echo "Done";
            }
            else{
                echo "Error";
            }
        }


    }


?>

Zerion Mini Shell 1.0