I have the following php code:
echo $iyear;
$query = "UPDATE users set
title='$ititle' ,
lastname='$ilas tname',
firstname='$ifi rstname',
middleinit='$im iddleinit',
year='$iyear',
hs_lastname='$i hs_lastname',
hs_firstname='$ ihs_firstname',
street1='$istre et1',
street2='$istre et2',
city='$icity',
state='$istate' ,
postal='$iposta l',
country='$icoun try',
share_email='$i share_email',
occupation='$io ccupation',
marital_status= '$imarital_stat us',
kids='$ikids',
spouse_lastname ='$ispouse_last name',
spouse_firstnam e='$ispouse_fir stname',
spouse_middlein it='$ispouse_mi ddleinit',
spouse_born_yea r='$ispouse_bor n_year',
phone='$iphone' ,
webpage='$iwebp age',
comment='$icomm ent'
WHERE user_name='$val id_user'";
$query_result = @mysql_query($q uery);
All of the $ixxxx vars are coming from a web form.
$iyear echo's correctly with what the user has entered into the forum,
however it is not updated in the table. All other fields are updated
correctly, but year is emptied.
Any ideas on where I can look?
Here is the table it's trying to update.
describe users;
MemberID int(11) PRI NULL auto_increment
user_name varchar(100)
title varchar(10)
lastname varchar(40)
firstname varchar(40)
middleinit char(1)
year int(4) YES NULL
hs_lastname varchar(40)
hs_firstname varchar(40)
street1 varchar(40)
street2 varchar(40)
city varchar(40)
state char(2)
postal varchar(9)
country char(2)
share_email char(1)
occupation varchar(100)
marital_status char(1)
kids char(1)
thenphoto varchar(200)
nowphoto varchar(200)
spouse_lastname varchar(40)
spouse_firstnam e varchar(40)
spouse_middlein it char(1)
spouse_born_yea r varchar(4)
spouse_photo varchar(200)
phone varchar(20)
webpage varchar(200)
comment text
Password varchar(40)
PassQuestion varchar(100)
LastUpdated date 0000-00-00
PassAnswer varchar(100)
Active char(1) N
ActiveCode varchar(15)
echo $iyear;
$query = "UPDATE users set
title='$ititle' ,
lastname='$ilas tname',
firstname='$ifi rstname',
middleinit='$im iddleinit',
year='$iyear',
hs_lastname='$i hs_lastname',
hs_firstname='$ ihs_firstname',
street1='$istre et1',
street2='$istre et2',
city='$icity',
state='$istate' ,
postal='$iposta l',
country='$icoun try',
share_email='$i share_email',
occupation='$io ccupation',
marital_status= '$imarital_stat us',
kids='$ikids',
spouse_lastname ='$ispouse_last name',
spouse_firstnam e='$ispouse_fir stname',
spouse_middlein it='$ispouse_mi ddleinit',
spouse_born_yea r='$ispouse_bor n_year',
phone='$iphone' ,
webpage='$iwebp age',
comment='$icomm ent'
WHERE user_name='$val id_user'";
$query_result = @mysql_query($q uery);
All of the $ixxxx vars are coming from a web form.
$iyear echo's correctly with what the user has entered into the forum,
however it is not updated in the table. All other fields are updated
correctly, but year is emptied.
Any ideas on where I can look?
Here is the table it's trying to update.
describe users;
MemberID int(11) PRI NULL auto_increment
user_name varchar(100)
title varchar(10)
lastname varchar(40)
firstname varchar(40)
middleinit char(1)
year int(4) YES NULL
hs_lastname varchar(40)
hs_firstname varchar(40)
street1 varchar(40)
street2 varchar(40)
city varchar(40)
state char(2)
postal varchar(9)
country char(2)
share_email char(1)
occupation varchar(100)
marital_status char(1)
kids char(1)
thenphoto varchar(200)
nowphoto varchar(200)
spouse_lastname varchar(40)
spouse_firstnam e varchar(40)
spouse_middlein it char(1)
spouse_born_yea r varchar(4)
spouse_photo varchar(200)
phone varchar(20)
webpage varchar(200)
comment text
Password varchar(40)
PassQuestion varchar(100)
LastUpdated date 0000-00-00
PassAnswer varchar(100)
Active char(1) N
ActiveCode varchar(15)
Comment