Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.15.25.212
function constLogin() {
var fmob = $("#fmob").val();
var pwd = $("#fpwd").val();
$.ajax({
type: "POST",
url: "../php/constLogin.php",
data: "fmob=" + fmob + "&fpwd=" + pwd,
success: function (res) {
if (res == "invalid") {
Swal.fire("Invalid Login");
} else {
console.log("HIII");
window.location.href = "../const/constDet.html";
}
},
});
}
function getConstDet() {
$("#app-dashboard").load("../const/constDash.html");
}
function constVaild() {
var name = $("#name").val();
var fdegree = $("#fdegree").val();
var fmobile = $("#fmobile").val();
var femail = $("#femail").val();
var checks = document.getElementById("check").checked;
if (name == "") {
Swal.fire("Enter Student Name");
return;
}
if (fdegree == "") {
Swal.fire("Select Specialization");
return;
}
if (fmobile.length != 10) {
Swal.fire("Mobile Number should be 10 digits");
return;
}
if (femail == "") {
Swal.fire("Enter Email Id");
return;
}
if (checks == false) {
Swal.fire("Select Condisition");
return;
}
var params =
"sname=" +
name +
"&fmobile=" +
fmobile +
"&femail=" +
femail +
"&fdegree=" +
fdegree;
$.ajax({
type: "POST",
url: "php/register.php",
data: params,
success: function (res) {
var status = JSON.parse(res);
console.log(status);
if (status.fstatus == "invalid") {
var { msg } = JSON.parse(res);
Swal.fire({
title: msg,
type: "warning",
showCancelButton: false,
confirmButtonColor: "#5495ff",
confirmButtonText: "OK",
closeOnConfirm: false,
});
} else {
// window.location.href = "html_modules/mainpage.html";
}
},
});
}
|