Salve a tutti,
vorrei creare un form nel quale ho intenzione di inserire più dati da più caselle di testo in un unico campo "email" (database: access).
Ho provato a crearne uno ma mi da errore:
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert")) <> "") Then
MM_editConnection = MM_conn_reg_STRING
MM_editTable = "email"
MM_editRedirectUrl = ""
MM_fieldsStr = "prefisso|value|at|value|nomeDominio|value|estensi oneDominio|value"
MM_columnsStr = "email|',none,''|email|',none,''|email|',none,''|e mail|',none,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(i+1) = CStr(Request.Form(MM_fields(i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
Il modulo in html è il seguente:
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="formEmail" onKeyUp="highlight(event)" onClick="highlight(event)">
<table width="550." border="0" cellspacing="0" cellpadding="0" height="30">
<tr>
<td></td>
</tr>
</table>
<table width="550" border="0" cellspacing="0" cellpadding="0" align="center" height="1" bgcolor="#333333">
<tr>
<td></td>
</tr>
</table>
<table align="center" width="550" cellpadding="0" cellspacing="0">
<tr valign="baseline">
<td nowrap align="right" class="dati" bgcolor="#333333" width="1" height="10"></td>
<td nowrap align="right" class="dati" height="10"></td>
<td height="10"></td>
<td height="10" width="1" bgcolor="#333333"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right" class="dati" bgcolor="#333333" height="10"></td>
<td nowrap align="right" class="dati" height="10"></td>
<td height="10"></td>
<td height="10" bgcolor="#333333"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right" class="dati" bgcolor="#333333"></td>
<td nowrap align="right" class="dati">Email Registrazione:[img]space.gif[/img]</td>
<td><span class="dati">
<input type="text" name="prefisso" class="dati">
<input type="text" name="at" class="dati" value="@">
<input type="text" name="nomeDominio" class="dati">
<select name="estensioneDominio" class="dati">
<option value=".com">.com</option>
<option value=".it">.it</option>
<option value=".net">.net</option>
</select>
</span></td>
<td bgcolor="#333333"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right" class="dati" bgcolor="#333333" width="1" height="10"></td>
<td nowrap align="right" class="dati" height="10"></td>
<td height="10"></td>
<td height="10" bgcolor="#333333"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right" bgcolor="#333333" width="1"></td>
<td nowrap align="right"></td>
<td>
<input type="submit" value="Inserisci record" class="moduli" onClick="MM_validateForm('nomeRegistrazione','','R ','username','','R','password','','R','indirizzoUR L','','R','indirizzoURL2','','R');return document.MM_returnValue" name="submit">
</td>
<td bgcolor="#333333"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right" bgcolor="#333333" width="1" height="10"></td>
<td nowrap align="right" height="10"></td>
<td height="10"></td>
<td height="10" bgcolor="#333333"></td>
</tr>
</table>
<table width="550" border="0" cellspacing="0" cellpadding="0" align="center" height="1" bgcolor="#333333">
<tr>
<td></td>
</tr>
</table>
<table width="550." border="0" cellspacing="0" cellpadding="0" height="30">
<tr>
<td></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="true">
</form>
--------------------------------------------------------------------------------------
Potete dirmi come si fa ?
Grazie
Andrea