note 104800 added to function.mssql-query
| From: | ezra_mod at yahoo dot com | Date: | Thu, 07 Jul 2011 19:26:38 +0000 |
| Subject: | note 104800 added to function.mssql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181339@lists.php.net to get a copy of this message | ||
I create my register function in php like this:
function register()
{
global $referralcredits;
$account = secure($_POST['account']);
$password = secure($_POST['password']);
$repassword = secure($_POST['repassword']);
$email = secure($_POST['email']);
$ref_usr = secure($_POST['ref_usr']);
$question = secure($_POST['squestion']);
$awnser = secure($_POST['sanswer']);
$code = secure($_POST['turing']);
$accounts = strlen($account);
$passwords = strlen($password);
$repasswords = strlen($repassword);
$questions = strlen($question);
$awnsers = strlen($awnser);
check_inject();
$queryaccount = mssql_query("Select * from MEMB_INFO where
memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$querymail = mssql_query("Select * from MEMB_INFO where mail_addr='$email'");
$mailcheck = mssql_num_rows($querymail);
$date = date('d-M-Y H:i:s');
if($error != 1) {
echo"<div class='info'>Account $account has been succsesfuly created on
$date!</div><br>";
if($md5 == 0) {
$a = mssql_query("INSERT INTO MEMB_INFO
(memb___id,memb__pwd,memb_name,sno__numb,mail_addr,appl_days,modi_days,out__days
,true_days,mail_chek,bloc_code,ctl1_code,
fpas_ques,fpas_answ,referral) VALUES
('$account','$password','$servername','1','$email',
'$date','$date','$date','$date','1','0','0','$question',
'$awnser','$ref_usr')");
$b = mssql_query("INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,
memb_guid,sno__numb,Bill_Sect
ion,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute,
Increase_Days ) VALUES
('2010','1',1234,'$account','$account',1,
'7','6','3','6','6','$date','0'
)");
}
else
{
$a = mssql_query("INSERT INTO MEMB_INFO (memb___id,memb__pwd,memb_name,sno__numb,
mail_addr,appl_days,modi_days,out__days
,true_days,mail_chek,bloc_code,ctl1_code,fpas_ques,
fpas_answ,referral) VALUES
('$account',md5($password),'$servername','1','$email','$date','$date',
'$date','$date','1','0','0','$question','$awnser','$ref_usr')");
$b = mssql_query("INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,
memb_guid,sno__numb,Bill_Sect
ion,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute
,Increase_Days ) VALUES
('2010','1',1234,'$account','$account',1,'7','6','3','6','6'
,'$date','0' )");
}
}
after which I intend to create a system of referral and added so:
if (!empty($ref_usr))
{
$db4=mssql_query("UPDATE MEMB_CREDITS SET credits = credits + '{$referralcredits}'
WHERE memb___id = '$ref_usr'");
}
everything is perfect when a new user that is added to the referral script register an account
number that receives a referral credit, which happens and it works perfectly, but now I want to add
a particular priority like this: for the $ref_usr recive referralcredits only when the new created
account reaches $TimeOnline (MEMB_INFO table column) to some value, you have some suggestions how
can I create it?
----
Server IP: 69.147.83.197
Probable Submitter: 92.84.227.57
----
Manual Page -- http://www.php.net/manual/en/function.mssql-query.php
Edit -- https://master.php.net/note/edit/104800
Del: integrated -- https://master.php.net/note/delete/104800/integrated
Del: useless -- https://master.php.net/note/delete/104800/useless
Del: bad code -- https://master.php.net/note/delete/104800/bad+code
Del: spam -- https://master.php.net/note/delete/104800/spam
Del: non-english -- https://master.php.net/note/delete/104800/non-english
Del: in docs -- https://master.php.net/note/delete/104800/in+docs
Del: other reasons-- https://master.php.net/note/delete/104800
Reject -- https://master.php.net/note/reject/104800
Search -- https://master.php.net/manage/user-notes.php