1

I create this richiesta.html:

<HTML>
<BODY>
<table border> //create a simple table
<tr>
<td>
<form  ACTION="richiesta.asp"> //open the file richiesta.asp
<table> //start a table format
<tr><td><input name="cognome" size="20"/></tr> //contain a input text 
</table>
</form>
</td>
</tr>
<td><input type="submit" value="Invia"></td><td> // contein a button to send value to DB
</table>
</BODY>
</HTML>

I create richiesta.asp:

<HTML>
<BODY>
<%
cognome = Request.Form("cognome")
%>
<%
Session.timeout = 1 //Check the session
If IsObject(Session("iscrizioni")) Then
Set conn = Session("iscrizioni")
Else
Set conn = Server.CreateObject("ADODB.Connection") //Check the connection
conn.open "iscrizioni"
Set Session("iscrizioni") = conn
End If
%>
<% 
If Stato = "" Then 
SQL="INSERT INTO iscrizioni (Cognome) VALUES ("SQL=SQL & "'" & cognome & "', "SQL=SQL ")
response.write(SQL) //
conn.execute(SQL) // Insert value
conn.close  //Close the connection
%>

// // End Page I want to insert in the BD Anagrafica, table Anagrafica the name of a student. DB structure: enter image description here

1
  • 1
    place the submit button inside your form :) Commented Dec 26, 2013 at 22:01

1 Answer 1

2

HTML Form action should be a valid (relative/absolute) url and not a physical location.

Also the input control and submit button should be inside form for default form submit.

Please change your <form> tags action attribute

<form action="riciesta.asp" >

 <table>
  <tr><td><input name="cognome" size="20"/></td></tr>
  <tr><td><input type="submit" value="submit"/></td></tr>
  </table>
</form>
Sign up to request clarification or add additional context in comments.

1 Comment

I try your solution on monday. Thamks for your availability :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.