Click here to Skip to main content
15,898,999 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
Hi:
Friends of my code PHP part is working properly, but the jQuery only message is printed No
Thanks for the tips here.

JavaScript
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 code:
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;
	}
	
	


?>


Another way to tell if I am grateful to you
Posted
Updated 16-Mar-13 18:14pm
v2
Comments
Zoltán Zörgő 17-Mar-13 3:23am    
Oh yes, what a nice SQLi leak.
1) check with ie9 developer toolbar or fiddler the network traffic
2) what's the rest of your php code? why do you think that $json_ret will be returned?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900