Help needed urgently

Results 1 to 2 of 2

Thread: Help needed urgently

  1. #1
    Join Date
    Dec 1969

    Default Help needed urgently

    Hi,<BR>I have a in interface and there is a "update" button what i want is after user filled all your information and when the user clicks on "Upadte" button the data should automatically added to the databse.If somebody help me int this it would be highly appriciated.

  2. #2
    Join Date
    Dec 1969

    Default RE: Help needed urgently

    I am gonna show you one way to do what you want.<BR><BR>1.-You will use two pages<BR> A).-One where the user input the data an press the "Update" button.<BR> B).-The other that will recieve the data the user have just input and add it to your database.<BR><BR>In your first page you must have a line like this...<BR><BR>&#060;FORM action="second_page.asp" METHOD="post"&#062;<BR><BR>So when the user after typed his/her information, press the "Update" button, will be redirected to the "second" page.<BR><BR>Now in the second page, the first two lines of code will be something like this...<BR><BR>&#060;%@LANGUAGE="VBScript" %&#062;<BR>&#060;% Response.Buffer=true %&#062;<BR><BR>Then to get the values the user have just input...<BR><BR>&#060;%<BR> var_1=Request.form("field_name1_of_page1")<BR> var_2=Request.form("field_name2_of_page1")<BR> var_3=Request.form("field_name3_of_page1")<BR>%&#0 62;<BR><BR>Now open you database...<BR>&#060;%<BR> mBaseDir = ""<BR> set connVB = server.createobject("ADODB.Connection")<BR> "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath(mBaseDir & "path_to_your .mdb")<BR>%&#062;<BR><BR>Next step is tho put the data in your "table_name"<BR>&#060;%<BR> set rs = connVB.Execute("insert into table_name (field1,field2,field3) values (var_1,var2,var3)<BR> <BR> set rs = Nothing<BR> connVB.close<BR>%&#062;<BR><BR>And finally some code to get user redirected to whatever page you want.<BR><BR>&#060;% <BR> response.redirect "any_page.asp"<BR>%&#062;<BR><BR><BR>Hope this help, if you have any problems the your read this next article I found...<BR><BR><BR><BR>See&#039ya<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