hi
i have issue regarding asp code.
clubname1,clubn ame2,clubname3 is string value which is successfully send from one page to another . but when this page gets value to the above mention variable , data doesn't get insert to mssql database. it send null value. but when i do response.write( ).
eg : response.write (clubname1) i get the value whatever user inputs . but while inserting data into ms sql 2000 it insert null value.
please anybody help me regarding this code . and also tell me where am i doing wrong.
below is the code.
[code=asp]
<%
For Each key in Request.Form
strname = key
strvalue = Request.Form(ke y)
Session(strname ) = strvalue
Next
formno= Request.Form("f ormno")
regdate=Request .Form("regdate" )
clubname1= Request.Form("c lubname1")
response.write( clubname1)
clubname3= Request.Form("c lubname2")
officeclub= Request.Form("o fficeclub")
surname= Request.Form("s urname")
firstname= Request.Form("f irstname")
fathername= Request.Form("f athername")
dob= Request.Form("d ob")
resaddress= Request.Form("r esaddress")
pincode1= Request.Form("p incode1")
offaddress= Request.Form("o ffaddress")
pincode2= Request.Form("p incode2")
offtel= Request.Form("o fftel")
restel= Request.Form("r estel")
mobileno= Request.Form("m obileno")
city= Request.Form("c ity")
email= Request.Form("e mail")
supporting= Request.Form("s upporting")
fees= Request.Form("f ees")
sqlAdd="select * from player_reg "
set rsClubName=serv er.CreateObject ("ADODB.Records et")
openConn
rsClubName.open sqlAdd,dbc,2,3
rsClubName.addn ew
if formno<>"" then
rsClubName("For mno")=formno
response.Write( formno)
end if
if regdate<>"" then
rsClubName("Reg istrationdate") =regdate
end if
if clubname1<>"" then
rsClubName("Clu bname1")=clubna me1
response.Write( clubname1)
end if
if clubname3<>"" then
rsClubName("Clu bname2")=clubna me2
end if
if officeclub<>"" then
rsClubName("Clu bname3")=office club
end if
if surname<>"" then
rsClubName("Sur name")=surname
end if
if firstname<>"" then
rsClubName("Fir stname")=firstn ame
end if
if fathername<>"" then
rsClubName("Fat hersname")=fath ername
end if
if dob<>"" then
rsClubName("DOB ")=dob
end if
if resaddress<>"" then
rsClubName("Res add")=resaddres s
end if
if pincode1<>"" then
rsClubName("Pin code1")=pincode 1
end if
if offaddress<>"" then
rsClubName("Off add")=offaddres s
end if
if pincode2<>"" then
rsClubName("Pin code2")=pincode 2
end if
if offtel<>"" then
rsClubName("Off tel")=offtel
end if
if restel<>"" then
rsClubName("Res tel")=restel
end if
if mobileno<>"" then
rsClubName("Mob no")=mobileno
end if
if city<>"" then
rsClubName("Cit y")=city
end if
if email<>"" then
rsClubName("Ema il")=email
end if
if supporting<>"" then
rsClubName("Sup porting")=suppo rting
end if
if fees<>"" then
rsClubName("fee sid")=fees
end if
rsClubName.upda te
rsClubName.clos e
%>[/code]
i have issue regarding asp code.
clubname1,clubn ame2,clubname3 is string value which is successfully send from one page to another . but when this page gets value to the above mention variable , data doesn't get insert to mssql database. it send null value. but when i do response.write( ).
eg : response.write (clubname1) i get the value whatever user inputs . but while inserting data into ms sql 2000 it insert null value.
please anybody help me regarding this code . and also tell me where am i doing wrong.
below is the code.
[code=asp]
<%
For Each key in Request.Form
strname = key
strvalue = Request.Form(ke y)
Session(strname ) = strvalue
Next
formno= Request.Form("f ormno")
regdate=Request .Form("regdate" )
clubname1= Request.Form("c lubname1")
response.write( clubname1)
clubname3= Request.Form("c lubname2")
officeclub= Request.Form("o fficeclub")
surname= Request.Form("s urname")
firstname= Request.Form("f irstname")
fathername= Request.Form("f athername")
dob= Request.Form("d ob")
resaddress= Request.Form("r esaddress")
pincode1= Request.Form("p incode1")
offaddress= Request.Form("o ffaddress")
pincode2= Request.Form("p incode2")
offtel= Request.Form("o fftel")
restel= Request.Form("r estel")
mobileno= Request.Form("m obileno")
city= Request.Form("c ity")
email= Request.Form("e mail")
supporting= Request.Form("s upporting")
fees= Request.Form("f ees")
sqlAdd="select * from player_reg "
set rsClubName=serv er.CreateObject ("ADODB.Records et")
openConn
rsClubName.open sqlAdd,dbc,2,3
rsClubName.addn ew
if formno<>"" then
rsClubName("For mno")=formno
response.Write( formno)
end if
if regdate<>"" then
rsClubName("Reg istrationdate") =regdate
end if
if clubname1<>"" then
rsClubName("Clu bname1")=clubna me1
response.Write( clubname1)
end if
if clubname3<>"" then
rsClubName("Clu bname2")=clubna me2
end if
if officeclub<>"" then
rsClubName("Clu bname3")=office club
end if
if surname<>"" then
rsClubName("Sur name")=surname
end if
if firstname<>"" then
rsClubName("Fir stname")=firstn ame
end if
if fathername<>"" then
rsClubName("Fat hersname")=fath ername
end if
if dob<>"" then
rsClubName("DOB ")=dob
end if
if resaddress<>"" then
rsClubName("Res add")=resaddres s
end if
if pincode1<>"" then
rsClubName("Pin code1")=pincode 1
end if
if offaddress<>"" then
rsClubName("Off add")=offaddres s
end if
if pincode2<>"" then
rsClubName("Pin code2")=pincode 2
end if
if offtel<>"" then
rsClubName("Off tel")=offtel
end if
if restel<>"" then
rsClubName("Res tel")=restel
end if
if mobileno<>"" then
rsClubName("Mob no")=mobileno
end if
if city<>"" then
rsClubName("Cit y")=city
end if
if email<>"" then
rsClubName("Ema il")=email
end if
if supporting<>"" then
rsClubName("Sup porting")=suppo rting
end if
if fees<>"" then
rsClubName("fee sid")=fees
end if
rsClubName.upda te
rsClubName.clos e
%>[/code]
Comment