abstract:
[
'user_username'
];
$signup_points
=
$new_user
->
user_info
[
'user_username'
]+
1000
;
$sql
=
"UPDATE se_users SET user_points='$signup_points' WHERE user_info='$puid'"
;
Am i doing it wrong? i am no master of sql lol http://bbs.prog365.com/images/sites/honorhim.gif
It don't seem to give an error and after it saves the new user is there but the points is 0...
Ok i am trying to help my friend add a SQL insert command to his form but so far it just wont insert the value like i want it to so i wanted to post the original insert code and mine to see if anyone can see an error or a way to get it working!
Original code:
PHP Code:
// PROFILE FIELD INPUTS PROCESSED AND CHECKED FOR ERRORS ABOVE
// IF THERE IS NO ERROR, ADD USER AND USER PROFILE AND CONTINUE TO STEP 3
if(
$is_error
==
0
) {
$new_user
->
user_create
(
$signup_email
,
$signup_username
,
$signup_password
,
$signup_timezone
,
$signup_lang
);
// INSERT ACTION
$actions
->
actions_add
(
$new_user
,
"signup"
, Array(
'[username]'
), Array(
$new_user
->
user_info
[
user_username
]));
My code, i created a table in se_users called user_points int(20) not null default 0, and i am trying to inset a valu of 1000 into it when a user signs up!
PHP Code:
$puid
=
$new_user
->
user_info
[
'user_username'
];
$signup_points
=
$new_user
->
user_info
[
'user_username'
]+
1000
;
$sql
=
"UPDATE se_users SET user_points='$signup_points' WHERE user_info='$puid'"
;
Am i doing it wrong? i am no master of sql lol 
It don't seem to give an error and after it saves the new user is there but the points is 0... |