sua va hien thi
<head>
<meta http-equiv="Content-Language" content="en-us" charset="utf-8">
</head>
<!--#include file="connect.asp"-->
<%
ma=request.form("masv")
lop=request.form("malop")
ht=request.form("hoten")
ns=request.form("ngaysinh")
gt=request.form("gioitinh")
moketnoi
cn.execute "update sinhvien set malop='"&lop&"',hoten='"&ht&"',ngaysinh='"&ns&"',gioitinh='">&"' where cstr(masv)='"&ma&"'"
response.write("Da sua thanh cong !")
' lay du lieu tu query hienthi de hien thi cac sinh vien trong bang sinh vien ra man hinh
set bang=server.createobject("ADODB.recordset")
bang.open "select * from hienthi",cn
%>
<table border="1" width="64%" id="table1">
<tr>
<td>Ma sv</td>
<td>Lop</td>
<td width="164">Ho ten</td>
<td width="99">ngay sinh</td>
<td>gioitinh</td>
</tr>
<% do while not bang.eof %>
<tr>
<td><%=bang("masv")%></td>
<td><%=bang("tenlop")%></td>
<td width="164"><%=bang("hoten")%></td>
<td width="99"><%=bang("ngaysinh")%></td>
<td><%=bang("gioitinh")%></td>
</tr>
<% bang.movenext
loop
%>
</table>
Bạn đang đọc truyện trên: Truyen247.Pro