fatemeh r
یک شنبه 08 بهمن 1385, 19:50 عصر
دوستان عزیز سلام
خواهش میکنم سریع کمک کنید
در فایل a توسط حلقه while اطلاعات از db (جدول stcource) خوانده شده و در جدو لی نمایش داده می شود و در انتها ی هر رکورد فیلدی است که اگر در db مقدار داشته باشد نمایش داده شده و در غیر این صورت یک textbox نمایش می یابد. می خواهم با submit کردن این فرم در فایل بعدی مقادیر textbox ها را خوانده و با توجه به مقدار فیلد شماره دانشجوی ان رکورد , فیلد grade را در جدول stcource مقدار دهد.
فایل a :
<head>
<META content=fa http-equiv=Content-Language>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
a, p, .lc {color:black;font-family:tahoma;font-weight:none;font-size:13;line-height: 150% :150%;text-decoration:none}
</style>
</head>
<BODY bgColor=#ffffff leftMargin=0 link=#000080 text=#000000 topMargin=0 vLink=#ce0808><!----top----->
<table width="808" height="100%" bgcolor=#E1ECFF style="BORDER-COLLAPSE: collapse" >
<tr>
<td width="800" height="70" colspan=2>
<img src="images/Baner1.jpg" valign=top>
</td>
</tr>
<tr>
<td width=439>
<!--#include file="conn.asp"-->
<%dim rs
set rs=server.CreateObject("adodb.recordset")
rs.ActiveConnection=db
rs.LockType=3
rs.CursorLocation=3
rs.CursorType=2
sql="select coid from cource where cotitle='"+request.form("cource")+"'"
rs.Open sql,db
dim rs1
set rs1=server.CreateObject("adodb.recordset")
rs1.ActiveConnection=db
rs1.LockType=3
rs1.CursorLocation=3
rs1.CursorType=2
sql1="select * from stcource inner join student on(stcource.stid=student.stid)where stcource.coid="+cstr(rs("coid"))+" and stcource.teach="+cstr(Request.querystring("id"))+""
'Response.Write sql1
'Response.end
rs1.Open sql1,db
i=2
j=1
%>
<form method=post id=form1 name=form1 action="intergradeact.asp?coid=<%=cstr(rs("coid"))%>">
<table border=1 align=right width=400 bgcolor=88b8ff>
<tr height=40 dir=rtl bgcolor="c6e2ff">
<td align=center colspan=5><font class=lc>
نمرات درس <%=Request.Form("cource")%>
</td>
</tr>
<tr height=40 dir=rtl bgcolor="c6e2ff">
<td align=center ><font class=lc>
نمره
</td>
<td align=center><font class=lc>
شماره دانشجویی
</td>
<td align=center><font class=lc>
نام خانوادگی
</td>
<td align=center><font class=lc>
نام دانشجو
</td>
</tr>
<%
do while not rs1.EOF%>
<tr height=40 dir=rtl <%if i mod 2 = 0 then%> bgcolor="88b8ff" <%else%>bgcolor="c6e2ff"<%end if%> >
<td align=center><font class=lc>
<%if rs1("grade")<>"" then
Response.Write rs1("grade")
else%>
<input type=text size=5 name=j>
<%end if%>
</td>
<td align=center><font class=lc>
<%=rs1("student.stid")%>
</td>
<td align=center><font class=lc>
<%=rs1("stfamily")%>
</td>
<td align=center><font class=lc>
<%=rs1("stname")%>
</td>
</tr>
<%
rs1.movenext
i=i+1
j=j+1
loop %>
<tr height=40 dir=rtl <%if i mod 2 = 0 then%> bgcolor="88b8ff" <%else%>bgcolor="c6e2ff"<%end if%> >
<td align=center colspan=4><font class=lc>
<input type=submit name="ok" value="تایید">
</td>
</tr>
</table></form>
</td>
<td width="355" dir=rtl>
<!--#include file="menu.asp"-->
</td>
</tr>
<tr height=100>
<td>
</td>
</tr>
خواهش میکنم سریع کمک کنید
در فایل a توسط حلقه while اطلاعات از db (جدول stcource) خوانده شده و در جدو لی نمایش داده می شود و در انتها ی هر رکورد فیلدی است که اگر در db مقدار داشته باشد نمایش داده شده و در غیر این صورت یک textbox نمایش می یابد. می خواهم با submit کردن این فرم در فایل بعدی مقادیر textbox ها را خوانده و با توجه به مقدار فیلد شماره دانشجوی ان رکورد , فیلد grade را در جدول stcource مقدار دهد.
فایل a :
<head>
<META content=fa http-equiv=Content-Language>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
a, p, .lc {color:black;font-family:tahoma;font-weight:none;font-size:13;line-height: 150% :150%;text-decoration:none}
</style>
</head>
<BODY bgColor=#ffffff leftMargin=0 link=#000080 text=#000000 topMargin=0 vLink=#ce0808><!----top----->
<table width="808" height="100%" bgcolor=#E1ECFF style="BORDER-COLLAPSE: collapse" >
<tr>
<td width="800" height="70" colspan=2>
<img src="images/Baner1.jpg" valign=top>
</td>
</tr>
<tr>
<td width=439>
<!--#include file="conn.asp"-->
<%dim rs
set rs=server.CreateObject("adodb.recordset")
rs.ActiveConnection=db
rs.LockType=3
rs.CursorLocation=3
rs.CursorType=2
sql="select coid from cource where cotitle='"+request.form("cource")+"'"
rs.Open sql,db
dim rs1
set rs1=server.CreateObject("adodb.recordset")
rs1.ActiveConnection=db
rs1.LockType=3
rs1.CursorLocation=3
rs1.CursorType=2
sql1="select * from stcource inner join student on(stcource.stid=student.stid)where stcource.coid="+cstr(rs("coid"))+" and stcource.teach="+cstr(Request.querystring("id"))+""
'Response.Write sql1
'Response.end
rs1.Open sql1,db
i=2
j=1
%>
<form method=post id=form1 name=form1 action="intergradeact.asp?coid=<%=cstr(rs("coid"))%>">
<table border=1 align=right width=400 bgcolor=88b8ff>
<tr height=40 dir=rtl bgcolor="c6e2ff">
<td align=center colspan=5><font class=lc>
نمرات درس <%=Request.Form("cource")%>
</td>
</tr>
<tr height=40 dir=rtl bgcolor="c6e2ff">
<td align=center ><font class=lc>
نمره
</td>
<td align=center><font class=lc>
شماره دانشجویی
</td>
<td align=center><font class=lc>
نام خانوادگی
</td>
<td align=center><font class=lc>
نام دانشجو
</td>
</tr>
<%
do while not rs1.EOF%>
<tr height=40 dir=rtl <%if i mod 2 = 0 then%> bgcolor="88b8ff" <%else%>bgcolor="c6e2ff"<%end if%> >
<td align=center><font class=lc>
<%if rs1("grade")<>"" then
Response.Write rs1("grade")
else%>
<input type=text size=5 name=j>
<%end if%>
</td>
<td align=center><font class=lc>
<%=rs1("student.stid")%>
</td>
<td align=center><font class=lc>
<%=rs1("stfamily")%>
</td>
<td align=center><font class=lc>
<%=rs1("stname")%>
</td>
</tr>
<%
rs1.movenext
i=i+1
j=j+1
loop %>
<tr height=40 dir=rtl <%if i mod 2 = 0 then%> bgcolor="88b8ff" <%else%>bgcolor="c6e2ff"<%end if%> >
<td align=center colspan=4><font class=lc>
<input type=submit name="ok" value="تایید">
</td>
</tr>
</table></form>
</td>
<td width="355" dir=rtl>
<!--#include file="menu.asp"-->
</td>
</tr>
<tr height=100>
<td>
</td>
</tr>