for Bill Wilkinson on yestherady q

Results 1 to 2 of 2

Thread: for Bill Wilkinson on yestherady q

  1. #1
    Join Date
    Dec 1969

    Default for Bill Wilkinson on yestherady q

    first thank&#039;s for the answer.<BR><BR>you ask me how do i submit all the forms this is my answer ,hope it&#039;s true<BR>for i=1 to request.form("id_no").count <BR><BR> sDate = year(date) & "-" & month(date) & "-" & day(date)<BR> <BR>SQl = "INSERT INTO status (first_name,last_name,status,ndate,department_code ,fromdate,remarks,id_no) "<BR>SQL = SQl & " VALUES("<BR>SQL = SQL & " &#039;"&replace(request.form("first_name")(i),"&#0 39;","&acute;")&"&#039;,"<BR>SQL = SQL & " &#039;"&replace(request.form("last_name")(i),"&#03 9;","&acute;")&"&#039;,"<BR>SQL = SQL & " &#039;"&request.form("options")(i)&"&#039;,"<BR>SQ L = SQL & " CONVERT(DATETIME, &#039;"& sDate &"&#039;),"<BR>SQL = SQL & " &#039;"&request.form("department_code")(i)&"&#039; ,"<BR>SQL = SQL & " &#039;"&request.form("sdate")(i)&"&#039;,"<BR>S QL = SQL & " &#039;"&replace(request.form("remarks")(i),"&#039; ","&acute;")&"&#039;,"<BR>SQL = SQL & " &#039;"&request.form("id_no")(i)&"&#039;"<BR>SQ L = SQL & ")"<BR>myconn.execute (SQL)<BR>next<BR> &#039;response.write SQl & "<BR>"<BR> if request.form("value")="1" then<BR> response.redirect "tofes_main.asp"<BR> else<BR> response.redirect "test.asp?department=" & request.form("department")(1) &"&curpage="&request.form("curpage")&#039;&"&value ="& request.form("value")<BR>end if<BR><BR>if it&#039;s not ok pleas tell me<BR>

  2. #2
    Join Date
    Dec 1969

    Default PLEASE do NOT start new threads!

    Stick with the ORIGINAL thread!<BR><BR>It&#039;s a real pain in the neck to go back and forth!<BR><BR>Anyway... Given the code you showed me for the other page, THAT WILL NEVER WORK!<BR><BR>ONLY ONE FORM from a given page can be posted! PERIOD!<BR><BR><BR>You have many, many forms on that prior page, and ONLY the one that contains a &#060;SUBMIT&#062; will be posted.<BR><BR>You know, these are *NOT* advanced questsions, at all. Before you get people mad at you, maybe you should start posting in the ASP forum, instead?<BR><BR>Among the other mistakes: You are doing Request.Form("first_name"), but on the page with the form you don&#039;t even bother to put the first_name into a form field! All you do is response.write it! So you can&#039;t possibly see it in this page.<BR><BR>And then you do this:<BR>sDate = year(date) & "-" & month(date) & "-" & day(date)<BR>but throw all that away and do this:<BR>SQL = SQL & " &#039;"&request.form("sdate")(i)&"&#039;,"<BR><BR> I think you need to go back and study the basics of ASP and HTML, again. Start with a smaller program, instead of trying to tackle something this big as a first project. It&#039;s gotten too big, and you are getting very lost in the details.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts