Code:
<?php
$UserID = trim($_POST['UserID']);
$Points = trim ($_POST['Points']);
// Connection with MSSQL server
$conn=mssql_connect('Server','ServerID','ServerPass');
$db = mssql_select_db('PS_UserData',$conn) or die("MSSQL Conection Error!");
$res = mssql_query("SELECT Point FROM PS_UserData.dbo.Users_Master WHERE (UserID) = ('".$UserID."')");
if ("[COLOR="Red"]$res[/COLOR]" < $Points)
{
echo "<b>Not enufe DP to Prosead</b><br>";
}
else
{
$res1 = mssql_query("SELECT UserID FROM PS_UserData.dbo.Users_Master WHERE (UserID) = ('".$UserID."')");
if (mssql_num_rows($res1))
{
// Insert Start
$query1 = "exec PS_GMTool.dbo.usp_DeleatePoints '".$UserID."','".$Points."'";
$rresult1 = mssql_query($query1) or die("account dose not exist");
{
echo "<b>Successfully deleated $Points Donation Points From $UserID account</b><br>";
}
}
else
{
echo '<b>Account dosent exist.</b>';
}
}
?>
i am not shure what i did wrong on the verafying that points in db is not less then points deducted when quary executes i got it ta makeshure account exists but cant get the point verification part to work can any1 plzz tell me were and what to add TY in advance






