Link to home
Start Free TrialLog in
Avatar of Melfeky
Melfeky

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of apresto
apresto
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Melfeky
Melfeky

ASKER

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()">
Avatar of Melfeky

ASKER

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">
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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()">
Avatar of Melfeky

ASKER

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">
Also the javascript function needs some slight modification
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.
<script language="JavaScript">
function fLogOut(){
   document.frmTest.iLogOut.value=1;
  document.frmTest.submit();
}
</script?
sorry

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

ASKER

yes i did , but still the same, the form is not submitted.
Care to post your entire code? It clearly needs to be debugged. The code you posted about has no <form> tag
Avatar of Melfeky

ASKER

hongjun
i used ur code but still the same.
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>
Avatar of Melfeky

ASKER

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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;By</SPAN><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><SPAN CLASS="arial10_news">&nbsp;</SPAN></B><INPUT TYPE="text" NAME="todate" value="<%=Today%>"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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;</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="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>
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
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;&nbs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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>
your code is a bit unreadable
hope i did not miss anything...

I never like dreamweaver
Avatar of Melfeky

ASKER

what editor are u using, i hate dreamweaver too but i don't know any other good editor?
Dreamweaver is okay if you don't let it generates stuff for you.
Avatar of Melfeky

ASKER

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.
Avatar of Melfeky

ASKER

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.
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.
ya..
definitely better for separate buttons
but then it's a bit unreadable..

perhaps I will leave it to another person to help...
Avatar of Melfeky

ASKER

So i am going to solve it by my own?  ;)
Avatar of Melfeky

ASKER

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!
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.
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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p;&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>
>>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
Avatar of Melfeky

ASKER

ok agentsmith
i will wait
Avatar of Melfeky

ASKER

Agentsmith,
is there any luck in my code?
Melfeky, can you post this to your web server & email me the username/password again? agent.smith.78@gmail.com
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
Avatar of Melfeky

ASKER

Agentsmith
i have sent u an email now
Avatar of Melfeky

ASKER

Have u got my email?
Yes Melfeky,

Just a little busy at work right now. I'll do my best to get back to you as soon as possible.
Avatar of Melfeky

ASKER

ok, take ur time.
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!

Apresto, by all means, please help melfeky with this. I normally would but am too busy at work right now to debug his code.
apresto,  just wanted to apologize for restating what you did in the very beginning...Bubs
Not a problem bubs, i didnt even realise mate!
Avatar of Melfeky

ASKER

Hello Apresto ,
glad that u came back, i will try ur last code and let u know.
Thanks
>>>glad that u came back

Ah thanks dude, thats makes me feel all special :o)
Avatar of Melfeky

ASKER

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.
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?
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!
Avatar of Melfeky

ASKER

apresto,
it is still the same
Avatar of Melfeky

ASKER

thank u all guys,
i got it work now using java script.