pano ko kaya irereplace tong code ng jquery dito sa code sa
echo "<script>window.location.href='admin/dashboard.php';</script>";
} else {
echo "<script>window.location.href= 'user/voucher.php';</script>";
ito code ko sa jquery
<!-- <script>
jQuery(document).ready(function() {
jQuery("#login_form").submit(function(e) {
e.preventDefault();
var formData = jQuery(this).serialize();
jQuery.ajax({
type: "POST",
url: "<?php echo $_SERVER['PHP_SELF']; ?>",
data: formData,
success: function(html) {
if (html == 'true') {
jQuery.jGrowl("Welcome Back!", { header: 'Access Granted' });
var delay = 2000;
setTimeout(function() {
window.location = './user/voucher.php'
}, delay);
} else {
jQuery.jGrowl("Please Check your username and Password", { header: 'Login Failed' });
}
}
});
return false;
});
});
</script> -->
echo "<script>window.location.href='admin/dashboard.php';</script>";
} else {
echo "<script>window.location.href= 'user/voucher.php';</script>";
ito code ko sa jquery
<!-- <script>
jQuery(document).ready(function() {
jQuery("#login_form").submit(function(e) {
e.preventDefault();
var formData = jQuery(this).serialize();
jQuery.ajax({
type: "POST",
url: "<?php echo $_SERVER['PHP_SELF']; ?>",
data: formData,
success: function(html) {
if (html == 'true') {
jQuery.jGrowl("Welcome Back!", { header: 'Access Granted' });
var delay = 2000;
setTimeout(function() {
window.location = './user/voucher.php'
}, delay);
} else {
jQuery.jGrowl("Please Check your username and Password", { header: 'Login Failed' });
}
}
});
return false;
});
});
</script> -->