proprio non diventa. se faccio così mi da la seconda pagina vuota.
posto il codice: pagina 1, dove inserisco il nome della tabella
codice:
<%@LANGUAGE="VBSCRIPT"%>
<%
Option Explicit
If Session("login") then
%>
<html>
<head>
<title>Mantieni calendario classifiche</title>
</head>
<body bgcolor="#C7E2FA">
<%
Dim objConn, strConn, strsql, objRs
Dim table
Set objConn = Server.CreateObject("ADODB.Connection")
strconn= Application("dbconn")
objConn.Open strConn
Set objRs = objConn.OpenSchema(20)
objRs.Filter="TABLE_TYPE='TABLE'"
table = objRs("TABLE_type")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Nuova pagina 1</title>
</head>
<body>
<FORM ACTION="mantieni_class_minigolf.asp?table=<%= table %>" METHOD="post">
<table>
<td>
<select name=table>
<%
do while not objRs.EOF
%>
<option><%=objRs("TABLE_NAME")%>
<%
objRs.MoveNext
loop
%>
</option></select></td>
<%
objRs.Close
Set objRs = Nothing
objConn.Close
Set objConn = Nothing
%>
<td align="right">
<input type="submit" name="submit" value="Vai">
</td>
</table>
</FORM>
</body>
</html>
<%
else
'quando hai tempo, metti queste linee in un .inc e formattale con un bel messaggio
'poi la puoi mettere dappertutto nell'ufficio
response.write "mi dispiace ma questo è il mio ufficio e tu non hai la chiave..."
end if
%>
Qui tutto bene, mi fa vedere tutte le tabelle presenti nel database:
codice seconda pagina: che mi esce senza la tabella e senza errori:
codice:
<%@LANGUAGE="VBSCRIPT"%>
<%
Option Explicit
If Session("login") then
%>
<html>
<head>
<title>Mantieni classifiche</title>
</head>
<body bgcolor="#C7E2FA">
<%
Dim objConn, strConn, objRs, strsql
Dim submitted, table
submitted = Request.QueryString("submitted")
If submitted then
strConn = Application("dbconn")
strsql = "Select * from "& table &" "
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strConn
Set objRs = Server.CreateObject("ADODB.Recordset")
set objRs = objConn.Execute(strsql)
'controlla per errori da solo
Response.write "<div align=center>"
Response.write "<table border='1' width='80%' cellpadding='2' cellspacing='2'>"
response.write "<tr><th colspan='6' align='center'><font size='+2' color='#003399'>Mantieni il calendario classifiche</font></th></tr>"
'ricordati di passare l'id del record nella querystring
Do while Not objRs.EOF
%>
<tr>
<td width="12%"><font color="#003399"><%= objRs("giocatore") %></font></td>
<td width="5%"><%= objRs("club") %></td>
<td width="5%"><%= objRs("categoria") %></td>
<td width="5%"><%= objRs("cat_assoluta") %></td>
<td width="30%"><%= objRs("ugiro") %></td>
<td width="33%"><%= objRs("dgiro") %></td>
<td width="33%"><%= objRs("tgiro") %></td>
<td width="10%">">cambia</td>
<td width="10%">">cancella</td>
</tr>
<%
objRs.MoveNext
Loop
Response.Write "</table></div>"
objRs.Close
Set objRs = Nothing
objConn.Close
Set objConn = Nothing
end if
else
'quando hai tempo, metti queste linee in un .inc e formattale con un bel messaggio
'poi la puoi mettere dappertutto nell'ufficio
response.write "mi dispiace ma questo è il mio ufficio e tu non hai la chiave..."
end if
%>
<p align="center" style="margin-top: 0; margin-bottom: 0"></p>
<table border="0" width="80%" align="center">
<tr>
<td align="right">torna a gestione</td>
</tr>
</table>
</body>
</html>
AIUTO!!!!
Grazie