Can you add this:
<%
If Request.Form("S ubmit") <> "" then
' your existing stuff here
Else
Response.Write( "Submit is a zero length string")
End If
%>
and tell us what you see on the screen?
(When you say: "You tried this before, and it didn't work" - it didn't work
before because you had no <form></form> tags right?)
Cheers
Ken
"janet" <kn*******@hotm ail.com> wrote in message
news:0b******** *************** *****@phx.gbl.. .
: hey thanks ken for at least posting in some options.
:
: i had already tried this thing before. I feel i am doign
: some very silly mistake.
:
: its still doesnt work!
:
: >-----Original Message-----
: >Change:
: >
: >If Request.queryst ring("Submit") <> "" then
: >
: >to
: >
: >If Request.Form("S ubmit") <> "" then
: >
: >Cheers
: >Ken
: >
: >"janet" <kn*******@hotm ail.com> wrote in message
: >news:08******* *************** ******@phx.gbl. ..
: >: hey hi ...
: >:
: >: thanks a lot for such a quick response.
: >:
: >: u r right i didnt put the form tag! silly on my part. i
: >: made the following changes (see below) but still nothing
: >: happens. I am newbie and maybe asking a silly question
: for
: >: you to recheck. please see if u suggest something.
: >:
: >: thanks a lot again
: >:
: >: <form action="aftStSe lection.asp" method="post">
: >: <table><tr><t d bgcolor="SILVER ">
: >: <BIG> <B> <FONT COLOR=blue>
: >: WELCOME 'STUDENT_NAME'
: >:
: >: TODAY IS <%=DATE()%></b></td><p></p></tr>
: >: </table><p></p>
: >: <input type = "text" size ="50" maxlength=90 name
: >: = "txtStory"> <p></P>
: >: <input type="button" value="DRAFT" name="draft"><p ></p>
: >: <input type="button" value="SUBMIT" name="submit">
: >: </form>
: >:
: >: <%
: >: Dim strStoryContent
: >: DIM RSA
: >: DIM QUERY1
: >: DIM ConnString
: >: DIM Conn
: >:
: >: ConnString = "Driver={My SQL ODBC 3.51 Driver};"
: >: ConnString = ConnString & "Port=3306; "
: >: ConnString = ConnString & "DATABASE=t est; "
: >: strStoryContent = Request.Form("t xtStory")
: >:
: >: If(Request.quer ystring("Submit ")) <> "" then
: >: response.write "come1"
: >: If Request("txtSto ry") <> "" then
: >: response.write "come2"
: >: Set Conn = Server.CreateOb ject("ADODB.Con nection")
: >: Conn.Open ConnString
: >: set RSA = Server.CreateOb ject("ADODB.Rec ordset")
: >: QUERY1 = "INSERT INTO student_content
: >:
: (student_id,sto ry_id,status_st udent,story_ori ginal_story_wo
: >: rd_count) VALUES
: >: ('1','100','dra ft','"&strStory Content&"',4)"
: >: Set rsa = conn.Execute(QU ERY1)
: >: End If
: >: end if
: >: %>
: >:
: >:
: >:
: >: >-----Original Message-----
: >: >Where is <form></form> tags?
: >: >
: >: >Suggest you *validate* your HTML first:
: >: >
http://validator.w3.org
: >: >
: >: >Cheers
: >: >Ken
: >: >
: >: >"janet" <kn*******@hotm ail.com> wrote in message
: >: >news:0a******* *************** ******@phx.gbl. ..
: >: >: hi ...
: >: >:
: >: >: When i click to the submit button, i want to insert
: >: value
: >: >: from the a text box to the mysql db. But when i enter
: >: text
: >: >: in the text box nothing happens on clickign the
: submit
: >: >: button. can anyone help me with ..
: >: >: i am goign crazy
: >: >:
: >: >: pls see the code below:
: >: >:
: >: >: <table><tr><t d bgcolor="SILVER ">
: >: >: <BIG> <B> <FONT COLOR=blue>
: >: >: WELCOME 'STUDENT_NAME'
: >: >:
: >: >: TODAY IS <%=DATE()%></b></td><p></p></tr>
: >: >: </table><p></p>
: >: >: <input type = "text" size ="50" maxlength=90 name
: >: >: = "txtStory"> <p></P>
: >: >: <input type="button" value="DRAFT"
: name="draft"><p ></p>
: >: >: <input type="button" value="SUBMIT" name="submit">
: >: >:
: >: >: <%
: >: >: Dim strStoryContent
: >: >: DIM RSA
: >: >: DIM QUERY1
: >: >: DIM ConnString
: >: >: DIM Conn
: >: >:
: >: >: ConnString = "Driver={My SQL ODBC 3.51 Driver};"
: >: >: ConnString = ConnString & "Port=3306; "
: >: >: ConnString = ConnString & "DATABASE=t est; "
: >: >: strStoryContent = Request.Form("t xtStory")
: >: >:
: >: >: If(Request.quer ystring("Submit ")) <> "" then
: >: >: response.write "come1" ....this doesnt get
: printed!!!!
: >: >: If Request("txtSto ry") <> "" then
: >: >: response.write "come2"
: >: >: Set Conn = Server.CreateOb ject("ADODB.Con nection")
: >: >: Conn.Open ConnString
: >: >: set RSA = Server.CreateOb ject("ADODB.Rec ordset")
: >: >: QUERY1 = "INSERT INTO student_content
: >: >:
: >:
: (student_id,sto ry_id,status_st udent,story_ori ginal_story_wo
: >: >: rd_count) VALUES
: >: >: ('1','100','dra ft','"&strStory Content&"',4)"
: >: >: Set rsa = conn.Execute(QU ERY1)
: >: >: End If
: >: >: end if
: >: >: %>
: >: >: thanks a lot
: >: >
: >: >
: >: >.
: >: >
: >
: >
: >.
: >