function signin(){ var user=document.getElementById('txtuser').value; var pass=document.getElementById('txtpass').value; $.post('vorod.php',{txtuser:user,txtpass:pass}, function(data) { if(data['success']) alert ("ok"); else alert ("noo"); //location.replace('/h_free_software/index.php'); }); }
<?php $json_ret = array('success'=>false); include ("send.php"); $obj=new classconnect(); $obj->funcconnect(); $_user=$_POST[txtuser]; $_pass=$_POST[txtpass]; $querylog=mysql_query("SELECT * FROM _tbvorod WHERE `_use_r`='{$_user}' AND _pas_s='{$_pass}'"); if($querylog){ $_SESSION[admin]=$_user; $json_ret['success'] = true; } ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)