i want to add a logout button in a form so that the user can click it to logout and also submits the form.

Hi all experts,
i have a form that have a submit button, i want to add a logout button in the same form so that the user can click it to logout and also submits the form.
Is there anyway that i can make this logout button also a submit button that saves the data in the form and also redirects the user to the logout.asp?
MelfekyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aprestoCommented:
In the page that you are posting to you could do this, have the name of both buttons as Submit and have the values different, "Submit" and "Logout", then

<input type="submit" name="submit" value="Submit">
<input type="submit" name="submit" value="Logout">

Dim buttonvalue

buttonvalue = request.form("logout")


...
Your code you need to process the info posted
...

If buttonvalue = "logout" Then
     response.redirect "somewhere.asp"
End If


will this work?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AgentSmith007Commented:
sure, just use some javascript:

on this image:
onclick="fLogout()"

add javascript:
<script>
function fLogOut(){
   document.forms.frmTest.iLogOut.value=1;
  document.forms.frmTest.submit();
}
</script>

say, this is your form:

<form name="frmTest" action="submit.asp" ... >
<input type="hidden" name="iLogOut" value="0">
</form>

then, on the page that processes the form (submit.asp in the above example) add this code after processing your form values:

<%
if cint(request.form("iLogOut")) = 1 then
   response.redirect("logout.asp")
end if
%>
0
aprestoCommented:
Or in your case:

If buttonvalue = "logout" Then
     response.redirect "logout.asp"
Else
    [do something else]
End If


You dont need the else, i just put it in there for the h#ll of it :o)
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

BubbaisBestCommented:
I would just like to add a safety factor to the logout itself...

If you are using Session variables to store username or userid or whatever, that on the logout.asp page you have <% Session.Abandon %> which will reset your session variables so those values are still not available if another user tries to use the system.

Bubs
0
MelfekyAuthor Commented:
Agentsmith,
ur code works as it saves the forms but it dosn't redirect me to the logout.asp, and when i click the logout button ,there is an error in the staus bar.
Here is the code of the form:
Dim straccessdb, conn, strcon
 strAccessDB = "db1.mdb"
 Set Conn = Server.CreateObject("ADODB.Connection")
 strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=; DBQ=" & Server.MapPath(strAccessDB)
 conn.Open strCon

'Function to make SQL statements not fail w/ special character(s)
function fQueryFriendly(strVar)
     strTemp = strVar
     strTemp = Replace(strTemp,"'","''")
     fQueryFriendly = strTemp
end function

'Set current user
dim M_USERNAME
M_USERNAME = session("user")
       
if request.form("iSaveAll") = "1" then


      'Saving entire form
     strSQL = "UPDATE instructions SET "
     strSQL = strSQL & "Business_Name = '" & fQueryFriendly(request.form("Business_Name")) & "'"
    strSQL = strSQL & ",todate = '" & fQueryFriendly(request.form("todate")) & "'"
     strSQL = strSQL & ",toby = '" & fQueryFriendly(request.form("toby")) & "'"

       strSQL = strSQL & " WHERE M_USERNAME = '" & session("user") & "'"
    'Response.Write strSQL
'Response.End
    conn.execute(strSQL)
End If


'read from db
strSQL ="SELECT * FROM instructions WHERE M_USERNAME = '" & Session("user") & "'"
Set oRS = conn.Execute(strSQL)
while not oRS.Eof
     'get the data
     Business_Name = oRS("Business_Name")
     todate = oRS("todate")
     toby = oRS("toby")
       
       oRS.MoveNext
wend

oRS.close
set oRS = nothing
%>
<%
if cint(request.form("iLogOut")) = 1 then
   response.redirect("logout.asp")
end if
%>
<script>
function fLogOut(){
   document.forms.frmTest.iLogOut.value=1;
  document.forms.frmTest.submit();
}
</script>

The logout button
<INPUT TYPE="submit" NAME="Submit" VALUE="Logout" onclick="fLogout()">
0
MelfekyAuthor Commented:
Apresto , ur code saves the data too but i am not redirected to logout.asp:
here is the form:
Dim straccessdb, conn, strcon
 strAccessDB = "db1.mdb"
 Set Conn = Server.CreateObject("ADODB.Connection")
 strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=; DBQ=" & Server.MapPath(strAccessDB)
 conn.Open strCon

'Function to make SQL statements not fail w/ special character(s)
function fQueryFriendly(strVar)
     strTemp = strVar
     strTemp = Replace(strTemp,"'","''")
     fQueryFriendly = strTemp
end function

'Set current user
dim M_USERNAME
M_USERNAME = session("user")
       
if request.form("iSaveAll") = "1" then


      'Saving entire form
     strSQL = "UPDATE instructions SET "
     strSQL = strSQL & "Business_Name = '" & fQueryFriendly(request.form("Business_Name")) & "'"
    strSQL = strSQL & ",todate = '" & fQueryFriendly(request.form("todate")) & "'"
     strSQL = strSQL & ",toby = '" & fQueryFriendly(request.form("toby")) & "'"

       strSQL = strSQL & " WHERE M_USERNAME = '" & session("user") & "'"
    'Response.Write strSQL
'Response.End
    conn.execute(strSQL)
End If


'read from db
strSQL ="SELECT * FROM instructions WHERE M_USERNAME = '" & Session("user") & "'"
Set oRS = conn.Execute(strSQL)
while not oRS.Eof
     'get the data
     Business_Name = oRS("Business_Name")
     todate = oRS("todate")
     toby = oRS("toby")
       
       oRS.MoveNext
wend

oRS.close
set oRS = nothing
If buttonvalue = "logout" Then
     response.redirect "logout.asp"
End If

%>

The logout button
<INPUT TYPE="submit" NAME="Submit" VALUE="Logout">
0
hongjunCommented:
try this


<script language="JavaScript">
function fLogOut(){
   document.frmTest.iLogOut.value=1;
  document.frmTest.submit();
}


<form name="frmTest" action="submit.asp" method="post">
<input type="hidden" name="iLogOut" value="0">
<INPUT TYPE="submit" NAME="Submit" VALUE="Logout" onclick="fLogout()">
</form>
0
AgentSmith007Commented:
As far as my code goes, your logout button should not be of type submit, it should be of type button:

<INPUT TYPE="BUTTON" VALUE="Logout" onclick="fLogout()">
0
MelfekyAuthor Commented:
agentsmith
when i changed it to button, the page is not submitted and there is an error in the status bar that says object is expected in line 101 which is this line:
<input type="hidden" name="iLogOut" value="0">
0
hongjunCommented:
Also the javascript function needs some slight modification
0
AgentSmith007Commented:
Did you modify the javascript to reflect the name of your form? The example I posted has the form named 'frmTest', this is the form that the javascript in that sample is referencing.
0
hongjunCommented:
<script language="JavaScript">
function fLogOut(){
   document.frmTest.iLogOut.value=1;
  document.frmTest.submit();
}
</script?
0
hongjunCommented:
sorry

<script language="JavaScript">
function fLogOut(){
   document.frmTest.iLogOut.value=1;
  document.frmTest.submit();
}
</script>
0
MelfekyAuthor Commented:
yes i did , but still the same, the form is not submitted.
0
AgentSmith007Commented:
Care to post your entire code? It clearly needs to be debugged. The code you posted about has no <form> tag
0
MelfekyAuthor Commented:
hongjun
i used ur code but still the same.
0
AgentSmith007Commented:
hongjun, are you just pasting the code that I posted verbatim? I posted this function about an hour ago. Oh I see, you took out the .forms. reference. Why would you do that? I know it works just the same, but it's not like my code is wrong!

<script>
function fLogOut(){
   document.forms.frmTest.iLogOut.value=1;
  document.forms.frmTest.submit();
}
</script>
0
MelfekyAuthor Commented:
here is the whole form:
<%@ Language=VBScript %>
<%
 dim dd,mm,yy,Today
dd=day(date)
if len(dd)=1 then
  dd="0" & dd
end if
mm=month(date)
if len(mm)=1 then
  mm="0" & mm
end if
yy=right(year(date),4)

'getting new date
Today= dd & "/" & mm & "/" & yy

'Declare connection object
Dim straccessdb, conn, strcon
 strAccessDB = "db1.mdb"
 Set Conn = Server.CreateObject("ADODB.Connection")
 strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=; DBQ=" & Server.MapPath(strAccessDB)
 conn.Open strCon

'Function to make SQL statements not fail w/ special character(s)
function fQueryFriendly(strVar)
     strTemp = strVar
     strTemp = Replace(strTemp,"'","''")
     fQueryFriendly = strTemp
end function

'Set current user
dim M_USERNAME
M_USERNAME = session("user")
       
if request.form("iSaveAll") = "1" then


      'Saving entire form
     strSQL = "UPDATE instructions SET "
     strSQL = strSQL & "Business_Name = '" & fQueryFriendly(request.form("Business_Name")) & "'"
    strSQL = strSQL & ",todate = '" & fQueryFriendly(request.form("todate")) & "'"
     strSQL = strSQL & ",toby = '" & fQueryFriendly(request.form("toby")) & "'"

       strSQL = strSQL & " WHERE M_USERNAME = '" & session("user") & "'"
    'Response.Write strSQL
'Response.End
    conn.execute(strSQL)
End If


'read from db
strSQL ="SELECT * FROM instructions WHERE M_USERNAME = '" & Session("user") & "'"
Set oRS = conn.Execute(strSQL)
while not oRS.Eof
     'get the data
     Business_Name = oRS("Business_Name")
     todate = oRS("todate")
     toby = oRS("toby")
       
       oRS.MoveNext
wend

oRS.close
set oRS = nothing
%>
<%
if cint(request.form("iLogOut")) = 1 then
   response.redirect("logout.asp")
end if
%>


<script language="JavaScript">

script language="JavaScript">
function fLogOut(){
   document.frmRealForm.iLogOut.value=1;
  document.frmRealForm.submit();
}
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <TITLE>Main Registration
Page</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1256">
<STYLE>.smnav {
      FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #ac6e02; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
.smtext {
      FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #909090; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
.button {
      FONT-WEIGHT: bolder; FONT-SIZE: 10px; FONT-FAMILY: verdana; TEXT-DECORATION: none
; color: #666666; border: medium #999999 none}
.text {
      FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
.prefer {
      FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
</STYLE> <META content="MSHTML 6.00.2743.600" name=GENERATOR>
<BODY vLink=#8c4242 aLink=#909090 link=#8c4242 bgColor=white>
<TABLE cellSpacing=0 cellPadding=0 width=810  bgcolor=DAEAEB border=0 bordercolor="#DAEAEB">
<form name="frmRealForm" method="POST">
<input type="hidden" name="iSaveAll" value="1">
<input type="hidden" name="iLogOut" value="0">

<TR> <TD colSpan=13 height="250"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="749" height="250">
<param name=movie value="header.swf"> <param name=quality value=high> <embed src="header.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="749" height="250">
</embed> </object></TD></TR> <TR> <TD colSpan=13 height="143"> <div align="center">
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><span class="arial10_news"><font size="2">Certification
Regarding<br> Debarment, Suspension, and Other Responsibility Matters<br> Primary
Covered Transactions</font></span></b></font><font size="2"><span class="arial10_news"><font face="Verdana, Arial, Helvetica, sans-serif"><b><br>
</b></font></span></font><span class="arial10_news"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>
</b></font></span></p><p><span class="arial10_memberWhite"><font color="#FF9900"><br>
</font></span><font color="#FF9900" class="arial10133845">This certification is
required by the regulations implementing Executive Order 12549, Debarment and
Suspension, 13 CFR<br> Part 145. The regulations were published as Part VII of
the May 26, 1988 Federal Register (pages 19160-19211). Copies of<br> the regulations
are available from local offices of the U.S. Small Business Administration.</font></p></div></TD></TR>
<TR> <TD height="28" valign="top" colSpan=13> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><span class="arial10_memberWhite"></span></font><span class="arial10_memberWhite">(BEFORE
COMPLETING CERTIFICATION, READ INSTRUCTIONS ON REVERSE)</span></div></TD></TR>
<TR> <TD width="3" height="5"></TD><TD width="49"></TD><TD width="14"></TD><TD width="2"></TD><TD width="75"></TD><TD width="335"></TD><TD width="177"></TD><TD width="74"></TD><TD width="2"></TD><TD width="51"></TD><TD width="2"></TD><TD width="22"></TD><TD width="4"></TD></TR>
<TR> <TD height="22"></TD><TD></TD><TD></TD><TD colSpan=5 rowspan="3" valign="top"><font size="3" face="Verdana, Arial, Helvetica, sans-serif"><b><font color="#8EB7BD"><br>
</font><font face=verdana size=2><span class="arial10_news">&nbsp;&nbsp;The prospective
primary participant certifies to the best of its knowledge and belief that it
and its principals:</span> </font> &nbsp;&nbsp; <font color="#8EB7BD"> </font></b></font>
</TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR> <TR> <TD height="16"></TD><TD valign="top">&nbsp;
<span class="arial11_news">&nbsp;1a)</span></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="11"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="27"></TD><TD colSpan=4 valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="arial10_news">(a)</span></TD><TD colspan="5" rowspan="2" valign="top" class="arial11133845">
<font face="verdana" size="2"><span class="arial10_news">&nbsp;&nbsp;Are not presently
debarred, suspended, proposed for disbarment, declared ineligible, <br> &nbsp;
or voluntarily&nbsp;excluded from covered transactions by any Federal department
or agency;</span><br> </font> &nbsp;&nbsp; &nbsp; <img height=10 src="t.gif"
      width=1 border=0> </TD><TD></TD><TD></TD><TD></TD></TR> <TR> <TD height="17"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="24"></TD><TD colspan="4" valign="top" class="arial10_news"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(b)</TD><TD colspan="6" rowspan="3" valign="top" class="arial10_news"><IMG height=1 src="t.gif"
      width=174 border=0><BR> &nbsp;&nbsp;&nbsp;Have not within a three-year period
preceding this application been convicted of or had a civil judgment<br> &nbsp;&nbsp;&nbsp;rendered
against them for commission of fraud or a criminal offense in connection with
obtaining,<br> &nbsp;&nbsp;&nbsp;attempting to obtain, or performing a public
(Federal, State, or local) transaction or contract under a<br> &nbsp;&nbsp;&nbsp;public
transaction; violation of Federal or State antitrust statutes or commission of
embezzlement, theft,<br> &nbsp;&nbsp;&nbsp;forgery, bribery, falsification or
destruction of records, making false statements, or receiving stolen<br> &nbsp;&nbsp;&nbsp;property;<br>
</TD><TD></TD><TD></TD></TR> <TR> <TD height="74"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="2"></TD><TD colspan="4" rowspan="2" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="arial10_news">(c)</span></TD><TD></TD><TD></TD></TR>
<TR> <TD height="27"></TD><TD colspan="5" rowspan="3" valign="top" class="arial10_news"><span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>Are
not presently indicted for or otherwise criminally or civilly charged by a governmental
entity (Federal,<br> <span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>State,
or local) with commission of any of the offenses enumerated in paragraph (1)(b)
of this<br> <span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>certification;
and<br> </TD><TD></TD><TD></TD><TD></TD></TR> <TR> <TD height="27"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD valign="top" colspan="5" rowspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="arial10_news">(d)</span></TD><TD height="2"></TD><TD></TD><TD></TD></TR>
<TR> <TD colspan="7" rowspan="2" valign="top" class="arial10_news">&nbsp;<span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>Have
not within a three-year period preceding this application had one or more public
transactions<br> <span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>(Federal,
State, or local) terminated for cause or default.</TD><TD height="20"></TD></TR>
<TD height="32"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TR>
<TD height="25" colspan="2" valign="top"><IMG height=1 src="t.gif" width=1
      border=0> <img height=1 src="t.gif" width=1
      border=0> <IMG HEIGHT=1 SRC="t.gif" WIDTH=1
      BORDER=0> <SPAN CLASS="arial11_news"></SPAN> <SPAN CLASS="arial11_news">
<SPAN CLASS="arial11_news"></SPAN> <SPAN CLASS="arial11_news"></SPAN></SPAN> <SPAN CLASS="arial11_news"></SPAN>
<span class="arial11_news"> <SPAN CLASS="arial11_news"></SPAN> <SPAN CLASS="arial11_news"></SPAN>2)</span></TD><TD></TD><TD></TD><TD colspan="4" rowspan="2" valign="top"><FONT SIZE="3" FACE="Verdana, Arial, Helvetica, sans-serif"><B><FONT FACE=verdana SIZE=2><SPAN CLASS="arial10_news">&nbsp;</SPAN><SPAN CLASS="arial11_news">&nbsp;</SPAN></FONT></B></FONT><SPAN CLASS="arial11_news">Where
the prospective primary participant is unable to certify to any of the statements
in this certification,<BR><FONT SIZE="3" FACE="Verdana, Arial, Helvetica, sans-serif"><B><FONT FACE=verdana SIZE=2>&nbsp;&nbsp;</FONT></B></FONT>such
prospective primary participant shall attach an explanation to this proposal.</SPAN></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR><TR><TD height="26"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<!-- CHOOSE EMAIL --> <!-- CHOOSE PASSWORD --> <!-- Real Name --> <TR vAlign=top>
<TD height="57"></TD><TD></TD><TD></TD><TD></TD><TD colspan="5" valign="top">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><SPAN CLASS="arial10_news">&nbsp;</SPAN></B><B CLASS="arial10_memberWhite"><SPAN CLASS="arial11_news">Business
Name</SPAN></B><BR> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT
      maxLength=63 name=Business_Name value="<%=Business_Name%>" size="50"> </TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR vAlign=top> <TD height="58"></TD><TD></TD><TD></TD><TD colspan="9" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><SPAN CLASS="arial10_news">&nbsp;</SPAN></B><SPAN CLASS="arial11_news">Date&nbsp;&nbsp;&nbsp;&nbsp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of Authorized Representative</SPAN></TD><TD></TD></TR><tr> <TD height="43" colspan="5" valign="top"><IMG height=1 src="t.gif" width=1
      border=0> <INPUT TYPE="button" NAME="Submit" VALUE="Logout" onclick="fLogout()">
</TD><td></td><td valign="top"><IMG height=1 src="t.gif" width=1
      border=0> <b class=button> <input type=submit  value="Save Your Info" class="orange">
</b></td><td></td><TD></TD><TD></TD><td></td><td></td><td></td></tr> <tr> <td height="22"></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<!-- IVIL opt --> </FORM></TABLE><p class="arial10_orangelinkU"><BR> <BR> </p>
</BODY></HTML>

<MM:BeginLock translatorClass="MM_SSI" type="ssi_include" depFiles="D:\Inetpub\wwwroot\pdf1\inc_footer.asp" orig="%3C!--#include file=%22inc_footer.asp%22--%3E" >
<link rel="stylesheet" href="ver.css" type="text/css">

<link rel="stylesheet" href="diet.css" type="text/css">
<table width="748" border="0" cellpadding="0" cellspacing="0" class="ver">
  <tr>
    <td height="43" width="745" valign="top">
      <div align="center">
        <p><font size=".5" color="#999999" face="Times New Roman, Times, serif">..................................................................................................................................................................................................</font><span class="smallHeader"><br>
          </span><span class="arial11_news">Copyright &copy; 2004 8aCertificationwizard.com
          Inc. All rights reserved. </span></p>
      </div>
    </td>
    <td width="3"></td>
  </tr>
  <tr>
    <td height="19" valign="top">
      <div align="center" class="ver">&nbsp;&nbsp;<span class="arial11666">&nbsp;</span><a href="Home.ASP" class="smallHeader"><span class="arial10_orangelink">Home</span></a><span class="arial11_beauty">
        | <a href="Register.asp" class="arial10_orangelink">Register</a> | <a href="ContactUs.asp" class="arial10_orangelink">Contact
        Us</a> | <a href="default.asp" class="arial10_orangelink">Messge Boards</a>|
        <a href="wglad.asp" class="arial10_orangelink">Company</a> </span></div>
    </td>
    <td></td>
  </tr>
</table>
          <MM:EndLock>
0
BubbaisBestCommented:
Melfeky,

Why not at the bottom of the form page have another input field that is a checkbox with something to the affect of Logout after form is submitted.  Then only have the single Submit button.

<input type="checkbox" value="logout" name="logout" />


Then on the page that you are inputting the data into the database you can read that field
by

strLogOff = Request("logout")
If strLogOff="logout" Then
  Session.Abandon  ' this will reset session variables
  Response.Redirect ("logout.asp")
Else
  Response.Write "Print here what you want the user to keep doing if not logged off"
End If

This is basically what apresto was doing only I am using a field instead of another button.  Same principle though.

Bubs
0
hongjunCommented:
try this


<%@ Language=VBScript %>
<%
 dim dd,mm,yy,Today
dd=day(date)
if len(dd)=1 then
  dd="0" & dd
end if
mm=month(date)
if len(mm)=1 then
  mm="0" & mm
end if
yy=right(year(date),4)

'getting new date
Today= dd & "/" & mm & "/" & yy

'Declare connection object
Dim straccessdb, conn, strcon
 strAccessDB = "db1.mdb"
 Set Conn = Server.CreateObject("ADODB.Connection")
 strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=; DBQ=" & Server.MapPath(strAccessDB)
 conn.Open strCon

'Function to make SQL statements not fail w/ special character(s)
function fQueryFriendly(strVar)
     strTemp = strVar
     strTemp = Replace(strTemp,"'","''")
     fQueryFriendly = strTemp
end function

'Set current user
dim M_USERNAME
M_USERNAME = session("user")
       
if request.form("iSaveAll") = "1" then


      'Saving entire form
     strSQL = "UPDATE instructions SET "
     strSQL = strSQL & "Business_Name = '" & fQueryFriendly(request.form("Business_Name")) & "'"
    strSQL = strSQL & ",todate = '" & fQueryFriendly(request.form("todate")) & "'"
     strSQL = strSQL & ",toby = '" & fQueryFriendly(request.form("toby")) & "'"

       strSQL = strSQL & " WHERE M_USERNAME = '" & session("user") & "'"
    'Response.Write strSQL
'Response.End
    conn.execute(strSQL)
End If


'read from db
strSQL ="SELECT * FROM instructions WHERE M_USERNAME = '" & Session("user") & "'"
Set oRS = conn.Execute(strSQL)
while not oRS.Eof
     'get the data
     Business_Name = oRS("Business_Name")
     todate = oRS("todate")
     toby = oRS("toby")
       
       oRS.MoveNext
wend

oRS.close
set oRS = nothing
%>
<%
if cint(request.form("iLogOut")) = 1 then
   response.redirect("logout.asp")
end if
%>


<script language="JavaScript">
function fLogOut(){
   document.frmRealForm.iLogOut.value=1;
  document.frmRealForm.submit();
}
</script>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <TITLE>Main Registration
Page</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1256">
<STYLE>.smnav {
     FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #ac6e02; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
.smtext {
     FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #909090; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
.button {
     FONT-WEIGHT: bolder; FONT-SIZE: 10px; FONT-FAMILY: verdana; TEXT-DECORATION: none
; color: #666666; border: medium #999999 none}
.text {
     FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
.prefer {
     FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
</STYLE> <META content="MSHTML 6.00.2743.600" name=GENERATOR>
<BODY vLink=#8c4242 aLink=#909090 link=#8c4242 bgColor=white>
<TABLE cellSpacing=0 cellPadding=0 width=810  bgcolor=DAEAEB border=0 bordercolor="#DAEAEB">
<form name="frmRealForm" method="POST">
<input type="hidden" name="iSaveAll" value="1">
<input type="hidden" name="iLogOut" value="0">

<TR> <TD colSpan=13 height="250"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="749" height="250">
<param name=movie value="header.swf"> <param name=quality value=high> <embed src="header.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="749" height="250">
</embed> </object></TD></TR> <TR> <TD colSpan=13 height="143"> <div align="center">
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><span class="arial10_news"><font size="2">Certification
Regarding<br> Debarment, Suspension, and Other Responsibility Matters<br> Primary
Covered Transactions</font></span></b></font><font size="2"><span class="arial10_news"><font face="Verdana, Arial, Helvetica, sans-serif"><b><br>
</b></font></span></font><span class="arial10_news"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>
</b></font></span></p><p><span class="arial10_memberWhite"><font color="#FF9900"><br>
</font></span><font color="#FF9900" class="arial10133845">This certification is
required by the regulations implementing Executive Order 12549, Debarment and
Suspension, 13 CFR<br> Part 145. The regulations were published as Part VII of
the May 26, 1988 Federal Register (pages 19160-19211). Copies of<br> the regulations
are available from local offices of the U.S. Small Business Administration.</font></p></div></TD></TR>
<TR> <TD height="28" valign="top" colSpan=13> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><span class="arial10_memberWhite"></span></font><span class="arial10_memberWhite">(BEFORE
COMPLETING CERTIFICATION, READ INSTRUCTIONS ON REVERSE)</span></div></TD></TR>
<TR> <TD width="3" height="5"></TD><TD width="49"></TD><TD width="14"></TD><TD width="2"></TD><TD width="75"></TD><TD width="335"></TD><TD width="177"></TD><TD width="74"></TD><TD width="2"></TD><TD width="51"></TD><TD width="2"></TD><TD width="22"></TD><TD width="4"></TD></TR>
<TR> <TD height="22"></TD><TD></TD><TD></TD><TD colSpan=5 rowspan="3" valign="top"><font size="3" face="Verdana, Arial, Helvetica, sans-serif"><b><font color="#8EB7BD"><br>
</font><font face=verdana size=2><span class="arial10_news">&nbsp;&nbsp;The prospective
primary participant certifies to the best of its knowledge and belief that it
and its principals:</span> </font> &nbsp;&nbsp; <font color="#8EB7BD"> </font></b></font>
</TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR> <TR> <TD height="16"></TD><TD valign="top">&nbsp;
<span class="arial11_news">&nbsp;1a)</span></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="11"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="27"></TD><TD colSpan=4 valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="arial10_news">(a)</span></TD><TD colspan="5" rowspan="2" valign="top" class="arial11133845">
<font face="verdana" size="2"><span class="arial10_news">&nbsp;&nbsp;Are not presently
debarred, suspended, proposed for disbarment, declared ineligible, <br> &nbsp;
or voluntarily&nbsp;excluded from covered transactions by any Federal department
or agency;</span><br> </font> &nbsp;&nbsp; &nbsp; <img height=10 src="t.gif"
      width=1 border=0> </TD><TD></TD><TD></TD><TD></TD></TR> <TR> <TD height="17"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="24"></TD><TD colspan="4" valign="top" class="arial10_news"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(b)</TD><TD colspan="6" rowspan="3" valign="top" class="arial10_news"><IMG height=1 src="t.gif"
      width=174 border=0><BR> &nbsp;&nbsp;&nbsp;Have not within a three-year period
preceding this application been convicted of or had a civil judgment<br> &nbsp;&nbsp;&nbsp;rendered
against them for commission of fraud or a criminal offense in connection with
obtaining,<br> &nbsp;&nbsp;&nbsp;attempting to obtain, or performing a public
(Federal, State, or local) transaction or contract under a<br> &nbsp;&nbsp;&nbsp;public
transaction; violation of Federal or State antitrust statutes or commission of
embezzlement, theft,<br> &nbsp;&nbsp;&nbsp;forgery, bribery, falsification or
destruction of records, making false statements, or receiving stolen<br> &nbsp;&nbsp;&nbsp;property;<br>
</TD><TD></TD><TD></TD></TR> <TR> <TD height="74"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="2"></TD><TD colspan="4" rowspan="2" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="arial10_news">(c)</span></TD><TD></TD><TD></TD></TR>
<TR> <TD height="27"></TD><TD colspan="5" rowspan="3" valign="top" class="arial10_news"><span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>Are
not presently indicted for or otherwise criminally or civilly charged by a governmental
entity (Federal,<br> <span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>State,
or local) with commission of any of the offenses enumerated in paragraph (1)(b)
of this<br> <span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>certification;
and<br> </TD><TD></TD><TD></TD><TD></TD></TR> <TR> <TD height="27"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD valign="top" colspan="5" rowspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="arial10_news">(d)</span></TD><TD height="2"></TD><TD></TD><TD></TD></TR>
<TR> <TD colspan="7" rowspan="2" valign="top" class="arial10_news">&nbsp;<span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>Have
not within a three-year period preceding this application had one or more public
transactions<br> <span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>(Federal,
State, or local) terminated for cause or default.</TD><TD height="20"></TD></TR>
<TD height="32"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TR>
<TD height="25" colspan="2" valign="top"><IMG height=1 src="t.gif" width=1
      border=0> <img height=1 src="t.gif" width=1
      border=0> <IMG HEIGHT=1 SRC="t.gif" WIDTH=1
      BORDER=0> <SPAN CLASS="arial11_news"></SPAN> <SPAN CLASS="arial11_news">
<SPAN CLASS="arial11_news"></SPAN> <SPAN CLASS="arial11_news"></SPAN></SPAN> <SPAN CLASS="arial11_news"></SPAN>
<span class="arial11_news"> <SPAN CLASS="arial11_news"></SPAN> <SPAN CLASS="arial11_news"></SPAN>2)</span></TD><TD></TD><TD></TD><TD colspan="4" rowspan="2" valign="top"><FONT SIZE="3" FACE="Verdana, Arial, Helvetica, sans-serif"><B><FONT FACE=verdana SIZE=2><SPAN CLASS="arial10_news">&nbsp;</SPAN><SPAN CLASS="arial11_news">&nbsp;</SPAN></FONT></B></FONT><SPAN CLASS="arial11_news">Where
the prospective primary participant is unable to certify to any of the statements
in this certification,<BR><FONT SIZE="3" FACE="Verdana, Arial, Helvetica, sans-serif"><B><FONT FACE=verdana SIZE=2>&nbsp;&nbsp;</FONT></B></FONT>such
prospective primary participant shall attach an explanation to this proposal.</SPAN></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR><TR><TD height="26"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<!-- CHOOSE EMAIL --> <!-- CHOOSE PASSWORD --> <!-- Real Name --> <TR vAlign=top>
<TD height="57"></TD><TD></TD><TD></TD><TD></TD><TD colspan="5" valign="top">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><SPAN CLASS="arial10_news">&nbsp;</SPAN></B><B CLASS="arial10_memberWhite"><SPAN CLASS="arial11_news">Business
Name</SPAN></B><BR> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT
      maxLength=63 name=Business_Name value="<%=Business_Name%>" size="50"> </TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR vAlign=top> <TD height="58"></TD><TD></TD><TD></TD><TD colspan="9" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><SPAN CLASS="arial10_news">&nbsp;</SPAN></B><SPAN CLASS="arial11_news">Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN CLASS="arial10_memberWhite">Name
and Title of Authorized Representative</SPAN></TD><TD></TD></TR><tr> <TD height="43" colspan="5" valign="top"><IMG height=1 src="t.gif" width=1
      border=0> <INPUT TYPE="button" NAME="button" VALUE="Logout" onclick="fLogout()">
</TD><td></td><td valign="top"><IMG height=1 src="t.gif" width=1
      border=0> <b class=button> <input type=submit  value="Save Your Info" class="orange">
</b></td><td></td><TD></TD><TD></TD><td></td><td></td><td></td></tr> <tr> <td height="22"></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<!-- IVIL opt --> </FORM></TABLE><p class="arial10_orangelinkU"><BR> <BR> </p>
</BODY></HTML>

<MM:BeginLock translatorClass="MM_SSI" type="ssi_include" depFiles="D:\Inetpub\wwwroot\pdf1\inc_footer.asp" orig="%3C!--#include file=%22inc_footer.asp%22--%3E" >
<link rel="stylesheet" href="ver.css" type="text/css">

<link rel="stylesheet" href="diet.css" type="text/css">
<table width="748" border="0" cellpadding="0" cellspacing="0" class="ver">
  <tr>
    <td height="43" width="745" valign="top">
      <div align="center">
        <p><font size=".5" color="#999999" face="Times New Roman, Times, serif">..................................................................................................................................................................................................</font><span class="smallHeader"><br>
          </span><span class="arial11_news">Copyright &copy; 2004 8aCertificationwizard.com
          Inc. All rights reserved. </span></p>
      </div>
    </td>
    <td width="3"></td>
  </tr>
  <tr>
    <td height="19" valign="top">
      <div align="center" class="ver">&nbsp;&nbsp;<span class="arial11666">&nbsp;</span><a href="Home.ASP" class="smallHeader"><span class="arial10_orangelink">Home</span></a><span class="arial11_beauty">
        | <a href="Register.asp" class="arial10_orangelink">Register</a> | <a href="ContactUs.asp" class="arial10_orangelink">Contact
        Us</a> | <a href="default.asp" class="arial10_orangelink">Messge Boards</a>|
        <a href="wglad.asp" class="arial10_orangelink">Company</a> </span></div>
    </td>
    <td></td>
  </tr>
</table>
          <MM:EndLock>
0
hongjunCommented:
your code is a bit unreadable
hope i did not miss anything...

I never like dreamweaver
0
MelfekyAuthor Commented:
what editor are u using, i hate dreamweaver too but i don't know any other good editor?
0
hongjunCommented:
Dreamweaver is okay if you don't let it generates stuff for you.
0
MelfekyAuthor Commented:
and by the way the form is not submitted  when i click the logout button and i have an error in the status bar
that says an object is expected too at line 103.
0
MelfekyAuthor Commented:
well when i tried Apresto's solution it didn't work .And by the way it would be much easier for the user to
just click the button that they want to either submit and go on , or logout.
0
AgentSmith007Commented:
I'm gonna bow out of this one. There're clearly too many cooks in the kitchen. All the code is here to get done what needs to be done. I'm sure one of these guys can help you figure out your syntax issues.
0
hongjunCommented:
ya..
definitely better for separate buttons
but then it's a bit unreadable..

perhaps I will leave it to another person to help...
0
MelfekyAuthor Commented:
So i am going to solve it by my own?  ;)
0
MelfekyAuthor Commented:
Agentsmith,
u have asked me to post all the code of the form, and i did.
But u never responded after that, all that i got from you is that u are going to be out of this.
I don't understand!
0
AgentSmith007Commented:
alright, i'll work on this. It's just difficult when 2 people are posting different kinds of code and one person is just posting a replication of my code. I can't be expected to support other people's code misuses. I'll look into your code and get back to you shortly.
0
hongjunCommented:
hi
1 last try from me (sorry.. because it's really a bit unreadable)



<%@ Language=VBScript %>
<%
 dim dd,mm,yy,Today
dd=day(date)
if len(dd)=1 then
  dd="0" & dd
end if
mm=month(date)
if len(mm)=1 then
  mm="0" & mm
end if
yy=right(year(date),4)

'getting new date
Today= dd & "/" & mm & "/" & yy

'Declare connection object
Dim straccessdb, conn, strcon
 strAccessDB = "db1.mdb"
 Set Conn = Server.CreateObject("ADODB.Connection")
 strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=; DBQ=" & Server.MapPath(strAccessDB)
 conn.Open strCon

'Function to make SQL statements not fail w/ special character(s)
function fQueryFriendly(strVar)
     strTemp = strVar
     strTemp = Replace(strTemp,"'","''")
     fQueryFriendly = strTemp
end function

'Set current user
dim M_USERNAME
M_USERNAME = session("user")
       
if request.form("iSaveAll") = "1" then


      'Saving entire form
     strSQL = "UPDATE instructions SET "
     strSQL = strSQL & "Business_Name = '" & fQueryFriendly(request.form("Business_Name")) & "'"
    strSQL = strSQL & ",todate = '" & fQueryFriendly(request.form("todate")) & "'"
     strSQL = strSQL & ",toby = '" & fQueryFriendly(request.form("toby")) & "'"

       strSQL = strSQL & " WHERE M_USERNAME = '" & session("user") & "'"
    'Response.Write strSQL
'Response.End
    conn.execute(strSQL)
End If


'read from db
strSQL ="SELECT * FROM instructions WHERE M_USERNAME = '" & Session("user") & "'"
Set oRS = conn.Execute(strSQL)
while not oRS.Eof
     'get the data
     Business_Name = oRS("Business_Name")
     todate = oRS("todate")
     toby = oRS("toby")
       
       oRS.MoveNext
wend

oRS.close
set oRS = nothing
%>
<%
if request.form("iLogOut") = "1" then
   response.redirect("logout.asp")
end if
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<script language="JavaScript">
function fLogOut(){
   document.frmRealForm.iLogOut.value="1";
  document.frmRealForm.submit();
}
</script>

<TITLE>Main Registration
Page</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1256">
<STYLE>.smnav {
     FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #ac6e02; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
.smtext {
     FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #909090; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
.button {
     FONT-WEIGHT: bolder; FONT-SIZE: 10px; FONT-FAMILY: verdana; TEXT-DECORATION: none
; color: #666666; border: medium #999999 none}
.text {
     FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
.prefer {
     FONT-WEIGHT: normal; FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
</STYLE> <META content="MSHTML 6.00.2743.600" name=GENERATOR>

</head>

<BODY vLink=#8c4242 aLink=#909090 link=#8c4242 bgColor=white>
<TABLE cellSpacing=0 cellPadding=0 width=810  bgcolor=DAEAEB border=0 bordercolor="#DAEAEB">
<form name="frmRealForm" method="POST">
<input type="hidden" name="iSaveAll" value="1">
<input type="hidden" name="iLogOut" value="0">

<TR> <TD colSpan=13 height="250"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="749" height="250">
<param name=movie value="header.swf"> <param name=quality value=high> <embed src="header.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="749" height="250">
</embed> </object></TD></TR> <TR> <TD colSpan=13 height="143"> <div align="center">
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><span class="arial10_news"><font size="2">Certification
Regarding<br> Debarment, Suspension, and Other Responsibility Matters<br> Primary
Covered Transactions</font></span></b></font><font size="2"><span class="arial10_news"><font face="Verdana, Arial, Helvetica, sans-serif"><b><br>
</b></font></span></font><span class="arial10_news"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>
</b></font></span></p><p><span class="arial10_memberWhite"><font color="#FF9900"><br>
</font></span><font color="#FF9900" class="arial10133845">This certification is
required by the regulations implementing Executive Order 12549, Debarment and
Suspension, 13 CFR<br> Part 145. The regulations were published as Part VII of
the May 26, 1988 Federal Register (pages 19160-19211). Copies of<br> the regulations
are available from local offices of the U.S. Small Business Administration.</font></p></div></TD></TR>
<TR> <TD height="28" valign="top" colSpan=13> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><span class="arial10_memberWhite"></span></font><span class="arial10_memberWhite">(BEFORE
COMPLETING CERTIFICATION, READ INSTRUCTIONS ON REVERSE)</span></div></TD></TR>
<TR> <TD width="3" height="5"></TD><TD width="49"></TD><TD width="14"></TD><TD width="2"></TD><TD width="75"></TD><TD width="335"></TD><TD width="177"></TD><TD width="74"></TD><TD width="2"></TD><TD width="51"></TD><TD width="2"></TD><TD width="22"></TD><TD width="4"></TD></TR>
<TR> <TD height="22"></TD><TD></TD><TD></TD><TD colSpan=5 rowspan="3" valign="top"><font size="3" face="Verdana, Arial, Helvetica, sans-serif"><b><font color="#8EB7BD"><br>
</font><font face=verdana size=2><span class="arial10_news">&nbsp;&nbsp;The prospective
primary participant certifies to the best of its knowledge and belief that it
and its principals:</span> </font> &nbsp;&nbsp; <font color="#8EB7BD"> </font></b></font>
</TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR> <TR> <TD height="16"></TD><TD valign="top">&nbsp;
<span class="arial11_news">&nbsp;1a)</span></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="11"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="27"></TD><TD colSpan=4 valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="arial10_news">(a)</span></TD><TD colspan="5" rowspan="2" valign="top" class="arial11133845">
<font face="verdana" size="2"><span class="arial10_news">&nbsp;&nbsp;Are not presently
debarred, suspended, proposed for disbarment, declared ineligible, <br> &nbsp;
or voluntarily&nbsp;excluded from covered transactions by any Federal department
or agency;</span><br> </font> &nbsp;&nbsp; &nbsp; <img height=10 src="t.gif"
      width=1 border=0> </TD><TD></TD><TD></TD><TD></TD></TR> <TR> <TD height="17"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="24"></TD><TD colspan="4" valign="top" class="arial10_news"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(b)</TD><TD colspan="6" rowspan="3" valign="top" class="arial10_news"><IMG height=1 src="t.gif"
      width=174 border=0><BR> &nbsp;&nbsp;&nbsp;Have not within a three-year period
preceding this application been convicted of or had a civil judgment<br> &nbsp;&nbsp;&nbsp;rendered
against them for commission of fraud or a criminal offense in connection with
obtaining,<br> &nbsp;&nbsp;&nbsp;attempting to obtain, or performing a public
(Federal, State, or local) transaction or contract under a<br> &nbsp;&nbsp;&nbsp;public
transaction; violation of Federal or State antitrust statutes or commission of
embezzlement, theft,<br> &nbsp;&nbsp;&nbsp;forgery, bribery, falsification or
destruction of records, making false statements, or receiving stolen<br> &nbsp;&nbsp;&nbsp;property;<br>
</TD><TD></TD><TD></TD></TR> <TR> <TD height="74"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD height="2"></TD><TD colspan="4" rowspan="2" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="arial10_news">(c)</span></TD><TD></TD><TD></TD></TR>
<TR> <TD height="27"></TD><TD colspan="5" rowspan="3" valign="top" class="arial10_news"><span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>Are
not presently indicted for or otherwise criminally or civilly charged by a governmental
entity (Federal,<br> <span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>State,
or local) with commission of any of the offenses enumerated in paragraph (1)(b)
of this<br> <span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>certification;
and<br> </TD><TD></TD><TD></TD><TD></TD></TR> <TR> <TD height="27"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR> <TD valign="top" colspan="5" rowspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="arial10_news">(d)</span></TD><TD height="2"></TD><TD></TD><TD></TD></TR>
<TR> <TD colspan="7" rowspan="2" valign="top" class="arial10_news">&nbsp;<span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>Have
not within a three-year period preceding this application had one or more public
transactions<br> <span class="arial10_news">&nbsp;&nbsp;&nbsp;</span>(Federal,
State, or local) terminated for cause or default.</TD><TD height="20"></TD></TR>
<TD height="32"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TR>
<TD height="25" colspan="2" valign="top"><IMG height=1 src="t.gif" width=1
      border=0> <img height=1 src="t.gif" width=1
      border=0> <IMG HEIGHT=1 SRC="t.gif" WIDTH=1
      BORDER=0> <SPAN CLASS="arial11_news"></SPAN> <SPAN CLASS="arial11_news">
<SPAN CLASS="arial11_news"></SPAN> <SPAN CLASS="arial11_news"></SPAN></SPAN> <SPAN CLASS="arial11_news"></SPAN>
<span class="arial11_news"> <SPAN CLASS="arial11_news"></SPAN> <SPAN CLASS="arial11_news"></SPAN>2)</span></TD><TD></TD><TD></TD><TD colspan="4" rowspan="2" valign="top"><FONT SIZE="3" FACE="Verdana, Arial, Helvetica, sans-serif"><B><FONT FACE=verdana SIZE=2><SPAN CLASS="arial10_news">&nbsp;</SPAN><SPAN CLASS="arial11_news">&nbsp;</SPAN></FONT></B></FONT><SPAN CLASS="arial11_news">Where
the prospective primary participant is unable to certify to any of the statements
in this certification,<BR><FONT SIZE="3" FACE="Verdana, Arial, Helvetica, sans-serif"><B><FONT FACE=verdana SIZE=2>&nbsp;&nbsp;</FONT></B></FONT>such
prospective primary participant shall attach an explanation to this proposal.</SPAN></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR><TR><TD height="26"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<!-- CHOOSE EMAIL --> <!-- CHOOSE PASSWORD --> <!-- Real Name --> <TR vAlign=top>
<TD height="57"></TD><TD></TD><TD></TD><TD></TD><TD colspan="5" valign="top">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><SPAN CLASS="arial10_news">&nbsp;</SPAN></B><B CLASS="arial10_memberWhite"><SPAN CLASS="arial11_news">Business
Name</SPAN></B><BR> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT
      maxLength=63 name=Business_Name value="<%=Business_Name%>" size="50"> </TD><TD></TD><TD></TD><TD></TD><TD></TD></TR>
<TR vAlign=top> <TD height="58"></TD><TD></TD><TD></TD><TD colspan="9" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><SPAN CLASS="arial10_news">&nbsp;</SPAN></B><SPAN CLASS="arial11_news">Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><INPUT TYPE="text" NAME="toby" SIZE="20" value="<%=toby%>"><br><SPAN CLASS="arial11_news">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN CLASS="arial10_memberWhite">Name
and Title of Authorized Representative</SPAN></TD><TD></TD></TR><tr> <TD height="43" colspan="5" valign="top"><IMG height=1 src="t.gif" width=1
      border=0> <INPUT TYPE="button" NAME="button" VALUE="Logout" onclick="fLogout()">
</TD><td></td><td valign="top"><IMG height=1 src="t.gif" width=1
      border=0> <b class=button> <input type=submit  value="Save Your Info" class="orange">
</b></td><td></td><TD></TD><TD></TD><td></td><td></td><td></td></tr> <tr> <td height="22"></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<!-- IVIL opt --> </FORM></TABLE><p class="arial10_orangelinkU"><BR> <BR> </p>


<MM:BeginLock translatorClass="MM_SSI" type="ssi_include" depFiles="D:\Inetpub\wwwroot\pdf1\inc_footer.asp" orig="%3C!--#include file=%22inc_footer.asp%22--%3E" >
<link rel="stylesheet" href="ver.css" type="text/css">

<link rel="stylesheet" href="diet.css" type="text/css">
<table width="748" border="0" cellpadding="0" cellspacing="0" class="ver">
  <tr>
    <td height="43" width="745" valign="top">
      <div align="center">
        <p><font size=".5" color="#999999" face="Times New Roman, Times, serif">..................................................................................................................................................................................................</font><span class="smallHeader"><br>
          </span><span class="arial11_news">Copyright &copy; 2004 8aCertificationwizard.com
          Inc. All rights reserved. </span></p>
      </div>
    </td>
    <td width="3"></td>
  </tr>
  <tr>
    <td height="19" valign="top">
      <div align="center" class="ver">&nbsp;&nbsp;<span class="arial11666">&nbsp;</span><a href="Home.ASP" class="smallHeader"><span class="arial10_orangelink">Home</span></a><span class="arial11_beauty">
        | <a href="Register.asp" class="arial10_orangelink">Register</a> | <a href="ContactUs.asp" class="arial10_orangelink">Contact
        Us</a> | <a href="default.asp" class="arial10_orangelink">Messge Boards</a>|
        <a href="wglad.asp" class="arial10_orangelink">Company</a> </span></div>
    </td>
    <td></td>
  </tr>
</table>
          <MM:EndLock>


</BODY></HTML>
0
hongjunCommented:
>>just posting a replication of my code
If you were to look at your javascript function http:Q_21224843.html#12707322 and mine at http:Q_21224843.html#12707762 you will see the difference
0
MelfekyAuthor Commented:
ok agentsmith
i will wait
0
MelfekyAuthor Commented:
Agentsmith,
is there any luck in my code?
0
AgentSmith007Commented:
Melfeky, can you post this to your web server & email me the username/password again? agent.smith.78@gmail.com
0
BubbaisBestCommented:
Hopefully I can chime in here since I have waited for a while. I am still wondering why you even need to have Javascript functions as all the information is available when the submit button is pressed.

You had said that it is easier to use buttons than the checkbox which is fine.  So do the following with your 2 submit buttons:

<input type="submit" value="Save/Proceed" name="SubmitIt" />
<input type="submit" value="Save/Log Out" name="SubmitIt" />

Then on the page where you are reading the form information you can test to see what the value of SubmitIt is:

strSubmit = Request("SubmitIt")

If strSubmit = "Save/Log Out" Then
  Session.Abandon
  Response.Redirect ("logout.asp")
Else
  ' Do what you need to proceed
End If

Hope that will work for you and keep it as simple as possible.
Good luck and I will go back to lurking,

Bubs
0
MelfekyAuthor Commented:
Agentsmith
i have sent u an email now
0
MelfekyAuthor Commented:
Have u got my email?
0
AgentSmith007Commented:
Yes Melfeky,

Just a little busy at work right now. I'll do my best to get back to you as soon as possible.
0
MelfekyAuthor Commented:
ok, take ur time.
0
aprestoCommented:
Hey guys, been observing from a distance there was a little tension in the thread so i though it would cut the tension:

Why did the elephant bring toilet roll to the party....

Cos he was a party pooper:

anyway i might have my wires crossed here but i tried something similar with some basic code:

Form elements:

<form method="post" action="testing.asp">
<input type="text" name="test">
<input type="submit" name="submit" value="submit">
<input type="submit" name="logout" value="logout">
</form>

Asp code:

<%

dim textval, button_sub, button_lo

textval = request.form("test")
button_sub = request.form("submit")
button_lo = request.form("logout")

If len(trim(button_lo))>0 Then
      [do your update]
      response.redirect "logout.asp"
Else
      [Do your update and do something else]
End If

%>

Anyway thats my poxy contribution because i dont wanna get told off ;o)!

Good luck!

0
AgentSmith007Commented:
Apresto, by all means, please help melfeky with this. I normally would but am too busy at work right now to debug his code.
0
BubbaisBestCommented:
apresto,  just wanted to apologize for restating what you did in the very beginning...Bubs
0
aprestoCommented:
Not a problem bubs, i didnt even realise mate!
0
MelfekyAuthor Commented:
Hello Apresto ,
glad that u came back, i will try ur last code and let u know.
Thanks
0
aprestoCommented:
>>>glad that u came back

Ah thanks dude, thats makes me feel all special :o)
0
MelfekyAuthor Commented:
Apresto what do u mean by this
  [do your update] ?
would u tell me how can i exactly submit the form using the logout button and then logout?
by the way the first code that u posted at the top , submits the form and the data is saved but it is
not redirected to logout.asp.
so your first code works but not redirects to logout.asp.
0
aprestoCommented:
Thing is i did the first one abit wrong thats why it didnt redirect

<input type="submit" name="submit" value="Submit">
<input type="submit" name="submit" value="Logout">

Dim buttonvalue_lo, buttonvalue_sub

buttonvalue_lo = request.form("logout")
buttonvalue_sub = request.form("submit")

If buttonvalue_lo = "logout" Then
[**]
     response.redirect "logout.asp"
Else
[**]
End If

There can only be either "Submit" or "Logout" submitted from pushing the buttons, what you are saying is IF the value Logout is submitted (logout is pushed) then Do the Update then Redirect.  By using the Else you are saying if LogOut is NOT submitted (so "Submit" must be submitted) Then do the update but do NOT redirect to the Logout page.

in these [**] have the code you are using to update the database
 
does this work?
0
aprestoCommented:
Melfeky, dude i am off to bed as im in UK and v.tired but im sure agentsmith and No doubt Hongjun can help you out, ill check back tomoro morn anyway

ciao for now everyone!
0
MelfekyAuthor Commented:
apresto,
it is still the same
0
MelfekyAuthor Commented:
thank u all guys,
i got it work now using java script.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.