• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • Last Modified:

pass data to other page

hello,

i have a patientpage (asp), i load from an access database the appointments. that's all ok.

I wanted, that if you click on the page on send form, it saves changes made in the form, and i added a second submit button (on date of appointment) =)

so i have

- save button
<INPUT type="submit" name="bsubmit"  id="submitB" value="Bewaar">

- save button for each appointment.
<INPUT type="submit" name="bsubmit" id="submitB" value="<%=rst3("dateappoint")%>">
<INPUT type=hidden name=dateapp<%=rst3("dateappoint")%> value="<%=rst3("dateappoint")%>">
<INPUT type=hidden name=appid value="<%=rst3("id")%>">

i send (on submit form) the info to modify_patient.asp

how can i, know on witch submit button i clicked? on the page modify_patient.asp i want

  elseif Request.Form("bsubmit") = "????????????" then

there i want to retrieve the date of the appointment...

can someone help me, i know it"s not very clear wat i ask for
patientdetail.asp


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
	newwindow=window.open(url,'name','height=400,width=300,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}

// -->
</script>
<%if  Request.QueryString ("origine")=1 then

vname= Request.QueryString("vname")
vfirstname=Request.QueryString("vfirstname")
vphone=Request.QueryString("vphone")
vmobile=Request.QueryString("vmobile")
vstreet=Request.QueryString("vstreet")
vnbr=Request.QueryString("vnbr") 
vcp=Request.QueryString("vcp")
vcity=Request.QueryString("vcity")
vmail=Request.QueryString("vmail")
comment=Request.QueryString("comment")

end if


if  Request.QueryString ("origine")=0 then
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=" & Server.MapPath("database.accdb")
Set rst2 = Server.CreateObject("ADODB.Recordset")
strsql2 = "SELECT * from contacts where idcontact= " & Request.QueryString ("idcontact")  
rst2.Open strsql2,adoCon,,3

vname= rst2("lastname")
vfirstname=rst2("firstname")
vphone=rst2("phone")
vmobile= rst2("mobile")
vstreet= rst2("street")
vnbr=rst2("nbr")
vcp=rst2("cp")
vcity=rst2("city")
vmail=rst2("email")
comments=rst2("comments")
vtitel=rst2("sexe")
vbirthdate=rst2("birthdate")
vidcontact=rst2("idcontact")
vwork=rst2("work")
vhobby=rst2("hobby")
klacht=rst2("klacht")
medicatie=rst2("medicatie")		
operatie=rst2("operatie")
ongevallen=rst2("ongevallen")
ziekte=rst2("ziekte")	
technischonderzoek=rst2("technischonderzoek")		
systeemanamnese=rst2("systeemanamnese")	
musculoskeletaal=rst2("musculoskeletaal")	
hart=rst2("hart")	
longen=rst2("longen")	
gastro=rst2("gastro")	
hormonaal=rst2("hormonaal")	
nieren=rst2("nieren")	
gyneaco =rst2("gyneaco")	
neurologisch=rst2("neurologisch")	
dermatologisch=rst2("dermatologisch")	
psycho=rst2("psycho")	
anderebehandeling=rst2("anderebehandeling")	
behand=rst2("behand")	






DOB = Rst2("birthdate") 
age = Year(Date()) - Year(DOB)
If DatePart("y",Date()) < DatePart("y",DOB) Then age = age - 1

end if
%>
<head>
<meta content="nl-be" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>PATIENT INFORMATIE</title>
<style type="text/css">

#submitB{ 
border:none; 
padding:0; 
margin:0; 
font-family: "Segoe UI";
font-size: small;
text-decoration:underline; 
background-color:transparent; 
} 

.style3 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: small;
}
.style4 {
	background-color: #FFFFFF;
	font-family: "Segoe UI";
	font-size: small;
}
.style5 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: small;
	background-color: #E7E7DE;
}

.style9 {
	background-color: #FFFFFF;
	text-align: left;
}
.style10 {
	font-family: "Segoe UI";
	font-size: small;
}
.style12 {
	font-family: "Meiryo UI";
	font-size: large;
}
.style14 {
	color: #FFFFFF;
	font-family: "Segoe UI";
	text-align: left;
	background-color: #A0BE05;
}
.style15 {
	text-align: left;
}
.style16 {
	background-color: #E7E7DE;
}
.style17 {
	background-color: #A0BE05;
}
.style18 {
	font-family: "Meiryo UI";
	font-size: large;
	background-color: #A0BE05;
}


}
a {
	color: #333333; text-decoration : none
}
a:visited {
	color: #333333;
}
a:active {
	color: #A0BE05;
}
a:hover {
	color: #A0BE05;
}


.style19 {
	background-color: #E7E7DE;
	text-align: left;
}
.style20 {
	background-color: #FFFFFF;
}


.style21 {
	border-width: 0px;
}


.style22 {
	color: #FF0000;
}


</style>
</head>

<body style="background-image: url('images/bg_osteo.png');">

<table cellpadding="0" cellspacing="0" style="width: 100%">
	<tr>
		<td width="75px" class="style3">&nbsp;</td>
		<td width="20px">&nbsp;</td>
		<td width="20px">&nbsp;</td>
		<td colspan="2" width="750px">
		<!-- #include virtual="/test/includes/inc_topmenu.asp" -->
		</td>
		<td width="15px">&nbsp;</td>
		<td width="400px">&nbsp;</td>
	</tr>
	<tr>
		<td width="75px" class="style3"></td>
		<td width="20px">&nbsp;<span class="style3"> &nbsp;</span></td>
		<td width="20px"></td>
		<td colspan="2" width="750px"></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="style3" align="center" valign="top">
		<br />
		<!-- #include virtual="/test/includes/inc_leftmenu.asp" -->
		</td>
		<td class="style3">&nbsp;</td>
		<td class="style3">&nbsp;</td>
		<td class="style9" colspan="2" valign="top">
		<!-- Begin form code -->



<form name="form" method="post" action="modify_patient.asp">
<table cellpadding="0" cellspacing="0" style="width: 100%">
		<tr>
			<td class="style14" style="width: 277px"><strong>   
&nbsp;PATIENT INFORMATIE</strong></td>
			<td class="style18">&nbsp;</td>
			<td class="style17">&nbsp;</td>
		</tr>
		<tr>
		<td style="width: 277px">&nbsp;<br>
    <%if vtitel="Male" then %> 
	<img alt="" height="64" src="images/Edit-Male-User-icon.png" width="64" />
	<%else%>
	
	<img alt="" height="64" src="images/edit-female-user-icon.png" width="64" />
	<% end if%>
			</td>
			<td class="style12"><strong><%=vname%></strong>&nbsp;<strong><%=vfirstname%></strong> </td>
			<td>
			<a href="patientdetail_print.asp?origine=0&amp;idcontact=<%=vidcontact%>" target="_blank">
			<img alt="" class="style21" height="24" src="images/png/24x24/Print.png" width="24" /></a></td>
		</tr>
	</table>
	<br>  
    <br>
    <table cellpadding="0" cellspacing="0">
		<tr>
			<td width="15px">  &nbsp;</td>
			<td width="70px"class="style10" >
			Sexe:</td>
			<td width="300px">&nbsp;<select name="titel">
			<option value="Vide" selected>
			<option value="Male" <%if vtitel="Male" then Response.Write "selected"%>>
			Male
			<option value="Female" <%if vtitel="Female" then Response.Write "selected"%>>
			Female
		</select>
</td>
			<td width="50px" class="style10">  &nbsp;</td>
			<td width="300px">  &nbsp;</td>
		</tr>
		<tr>
			<td width="15px">  &nbsp;</td>
			<td width="70px"class="style10" >
	<%if  Request.QueryString ("origine")=1 then
			if len(vname)>0 then				
			else
				Response.Write "<font color=red>"
			end if
		  end if%>
	Name:*</td>
			<td width="300px">  <span class="style10">&nbsp;</span><input type="text" value="<%=vname%>" name="name" maxlength="60" class="style10"></td>
			<td width="100px" class="style10">  Firstname:</td>
			<td width="300px">  <span class="style10">&nbsp;</span><input type="text" value="<%=vfirstname%>" name="firstname" maxlength="60" class="style10"></td>
		</tr>
		<tr>
			<td >  &nbsp;</td>
			<td class="style10">  Phone:</td>
			<td width="300px">  <span class="style10">&nbsp;</span><input type="text" value="<%=vphone%>"name="phone" maxlength="60" class="style10"></td>
			<td class="style10">  mobile:</td>
			<td width="300px">  <span class="style10">&nbsp;</span><input type="text" value="<%=vmobile%>" name="mobile" maxlength="60" class="style10"></td>
		</tr>
		<tr>
			<td >  &nbsp;</td>
			<td class="style10">  &nbsp;</td>
			<td width="300px">  &nbsp;</td>
			<td class="style10">&nbsp;</td>
			<td width="300px">  &nbsp;</td>
		</tr>
		<tr>
			<td >  &nbsp;</td>
			<td class="style10" >  Street:</td>
			<td width="300px">  <span class="style10">&nbsp;</span><input type="text" value="<%=vstreet%>"name="street" maxlength="60" class="style10"></td>
			<td class="style10">  Number:</td>
			<td width="300px">  <span class="style10">&nbsp;</span><input type="text" value="<%=vnbr%>"  name="nbr" maxlength="60" class="style10"></td>
		</tr>
				<tr>
			<td >  &nbsp;</td>
			<td class="style10" >  CP:</td>
			<td width="300px">  <span class="style10">&nbsp;</span><input type="text" value="<%=vcp%>"  name="cp" maxlength="60" class="style10"></td>
			<td class="style10">  City:</td>
			<td width="300px">  <span class="style10">&nbsp;</span><input type="text" value="<%=vcity%>" name="city" maxlength="60" class="style10"></td>
		</tr>

				<tr>
			<td >  &nbsp;</td>
			<td class="style10" >  &nbsp;</td>
			<td width="300px">  &nbsp;</td>
			<td class="style10">&nbsp;</td>
			<td width="300px">  &nbsp;</td>
		</tr>

		<tr>
			<td>  &nbsp;</td>
			<td class="style10">  
			Email:</td>
			<td width="300px">  <span class="style10">&nbsp;</span><input type="text" value="<%=vmail%>" name="email" maxlength="60" class="style10"><br class="style10"></td>
			<td class="style10">Date of birth:&nbsp;</td>
			<td>
			&nbsp;<input type="text" value="<%=vbirthdate%>" name="birth" maxlength="60" class="style10"><br />
			
			
	
			
		</td>
		</tr>

		<tr>
			<td>  &nbsp;</td>
			<td class="style10">  
			&nbsp;</td>
			<td width="300px">  &nbsp;</td>
			<td class="style10">Age:&nbsp;</td>
			<td class="style10">&nbsp;<%=age%><br />
			</td>
		</tr>

		<tr>
			<td>  &nbsp;</td>
			<td class="style10">  
			Work:&nbsp;</td>
			<td width="300px">  
			&nbsp;<input type="text" value="<%=vwork%>" name="work" maxlength="60" class="style10">&nbsp;</td>
			<td class="style10">Hobby:&nbsp;</td>
			<td class="style10">
			&nbsp;<input type="text" value="<%=vhobby%>" name="hobby" maxlength="60" class="style10">&nbsp;</td>
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  Safety:</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="comments" cols="70" rows="2" class="style10"><%=comments%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  Klacht:</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="klacht" cols="70" rows="2" class="style10"><%=klacht%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  Medicatie:</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="medicatie" cols="70" rows="2" class="style10"><%=medicatie%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  Operatie:</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="operatie" cols="70" rows="2" class="style10"><%=operatie%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  Ongevallen:</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="ongevallen" cols="70" rows="2" class="style10"><%=ongevallen%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  Ziekte:</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="ziekte" cols="70" rows="2" class="style10"><%=ziekte%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  Technisch onderzoek:</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="technischonderzoek" cols="70" rows="2" class="style10"><%=technischonderzoek%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  <strong>Systeemanamnese: 
			</strong> </td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="systeemanamnese" cols="70" rows="2" class="style10"><%=systeemanamnese%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >-&nbsp; Musculoskeletaal:</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="musculoskeletaal" cols="70" rows="2" class="style10"><%=musculoskeletaal%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >- Hart en bloedvaten: &nbsp;</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="hart" cols="70" rows="2" class="style10"><%=hart%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >- Longen en ademhaling: &nbsp;</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="longen" cols="70" rows="2" class="style10"><%=longen%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" > - Gastro-intestinaal:&nbsp;</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="gastro" cols="70" rows="2" class="style10"><%=gastro%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >-&nbsp; Hormonaal:&nbsp;</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="hormonaal" cols="70" rows="2" class="style10"><%=hormonaal%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >- Nieren en blaas:&nbsp;</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="nieren" cols="70" rows="2" class="style10"><%=nieren%></textarea></td>
				
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >- Gyneaco-genitaal: &nbsp;</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="gyneaco" cols="70" rows="2" class="style10"><%=gyneaco%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >- Neurologisch:
&nbsp;</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="neurologisch" cols="70" rows="2" class="style10"><%=neurologisch%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >- Dermatologisch:&nbsp;</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="dermatologisch" cols="70" rows="2" class="style10"><%=dermatologisch%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >- Psycho-emotioneel:&nbsp;</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="psycho" cols="70" rows="2" class="style10"><%=psycho%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >Andere behandelingen:</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="anderebehandeling" cols="70" rows="2" class="style10"><%=anderebehandeling%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >  &nbsp;</td>
			
			
			<td width="300px" colspan="3"> 	</td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" valign="top" >Behandeling:</td>
			
			
			<td width="300px" colspan="3">&nbsp;<textarea name="behand" cols="70" rows="2" class="style10"><%=behand%></textarea></td>
			
			
		</tr>
		<tr>
			<td >  &nbsp;</td>
			
			
			<td class="style10" >&nbsp;</td>
			
			
			<td width="300px" colspan="3">  &nbsp;</td>
			
			
		</tr>
	</table>
<INPUT type=hidden name=idcontact value=<%=vidcontact%>>

&nbsp;
<INPUT type="submit" name="bsubmit"  id="submitB" value="Bewaar">

		</td>
		<td class="style15" valign="top">
		&nbsp;</td>
		<td class="style19" valign="top">
		<table cellpadding="0" cellspacing="0" style="width: 100%">
			<tr>
				<td class="style14" colspan="3"><strong>&nbsp;MIJN 5 LAATSTE 
				CONSULTATIES</strong></td>
			</tr>
			<tr>
			<td width="5px" class="style20">&nbsp;</td>
				<td class="style4"><br>
				
				
				
<%
Set rst3 = Server.CreateObject("ADODB.Recordset")
strsql3 = "SELECT TOP 5 * from reservation_salle where idcontact= " & Request.QueryString ("idcontact")  
rst3.Open strsql3,adoCon,,3


While not rst3.EOF

test= "com_" & rst3("dateappoint")

%>
 
   
<img src='images/png/24x24/kalender.png' />
<INPUT type="submit" name="bsubmit" id="submitB" value="<%=rst3("dateappoint")%>">
<INPUT type=hidden name=dateapp<%=rst3("dateappoint")%> value="<%=rst3("dateappoint")%>">
<INPUT type=hidden name=appid value="<%=rst3("id")%>">
<img src='images/png/24x24/klok.png' />
<%=rst3("heure")%> - 
<%=rst3("heure_fin")%>&nbsp;- &nbsp;<%=rst3("LOCATIE")%>&nbsp;&nbsp;
<img src='images/png/24x24/betaald.png' />
<% if rst3("betaald") = "1" then%>
<img alt="" height="16" src="images/png/24x24/OKsmall.png" width="16" />
<% else%>
<img alt="" height="16" src="images/png/24x24/nietbetaald.png" width="16" /><br>

<% end if%>

<% if rst3("ntopafspraak") = "1" then %>
			<img alt="" height="24" src="images/png/24x24/Alert.png" width="24" /><span class="style22"> Niet opgedaagd op afspraak</span>
			<% end if%>
<br><br>
<%=rst3("description")%>  
<br>
<%rst3.movenext
wend
rst3.close
%>
				</strong>
				</form>
<!-- End form code -->

</td>
				<td class="style20">


				</td>
			</tr>
			<tr>
				<td class="style20">&nbsp;</td>
				<td class="style20">
				
				
				toevoegen, als ik klik op afspraak, dat hij alle velden links
				<br />
				eerst saved, dan doorlinkt naar appointment!!! <br />
				<br />
				</td>
				<td class="style20">&nbsp;</td>

			</tr>
			<tr>
				<td class="style20">&nbsp;</td>
				<td class="style4">
				
				<a href="mijnconsultaties.asp?idcontact=<%=vidcontact%>" onclick="return popitup('mijnconsultaties.asp?idcontact=<%=vidcontact%>')">
				&gt;&gt;Bekijk al mijn consultaties</a></td>
				<td class="style20">&nbsp;</td>

			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td class="style3">&nbsp;</td>
		<td class="style3">&nbsp;</td>
		<td class="style5">&nbsp;</td>
		<td class="style4">&nbsp;</td>
		<td class="style4">&nbsp;</td>
		<td>&nbsp;</td>
		<td class="style16">&nbsp;</td>
	</tr>
	<tr>
		<td class="style3">&nbsp;</td>
		<td class="style3">&nbsp;</td>
		<td class="style3">&nbsp;</td>
		<td class="style10">&nbsp;</td>
		<td class="style10">&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
</table>

<p>
&nbsp;</p>

</body>

</html>

Open in new window

modify_patient.asp


<%

if request.Form("bsubmit") = "Bewaar" then


Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=" & Server.MapPath("database.accdb")
Set rst4 = Server.CreateObject("ADODB.Recordset")
'strsql4 = "SELECT * from contacts where idcontact= '" & Request ("idcontact") & "'"
strsql4 = "SELECT * from contacts where idcontact= " & Cint("0" & Request ("idcontact"))
rst4.Open strsql4,adoCon,,3


		rst4("LastName")= Request.Form("name") 
		rst4("FirstName")= Request.Form("firstname")		
		rst4("phone")= Request.Form("phone")
		rst4("mobile")= Request.Form("mobile")		
		rst4("street")= Request.Form("street")
		rst4("nbr")= Request.Form("nbr")		
		rst4("cp")= Request.Form("cp")
		rst4("city")= Request.Form("city")		
		rst4("email")= Request.Form("email")
		rst4("comments")= Request.Form("comments")		
		rst4("sexe") = Request.Form("titel")	
		rst4("work")= Request.Form("work")		
		rst4("hobby") = Request.Form("hobby")	
		rst4("klacht")= Request.Form("klacht")
		rst4("medicatie")= Request.Form("medicatie")		
		rst4("operatie")= Request.Form("operatie")
		rst4("ongevallen")= Request.Form("ongevallen")		
		rst4("ziekte") = Request.Form("ziekte")	
		rst4("technischonderzoek")= Request.Form("technischonderzoek")		
		rst4("systeemanamnese") = Request.Form("systeemanamnese")	
		rst4("musculoskeletaal") = Request.Form("musculoskeletaal")	
		rst4("hart") = Request.Form("hart")	
		rst4("longen") = Request.Form("longen")	
		rst4("gastro") = Request.Form("gastro")	
		rst4("hormonaal") = Request.Form("hormonaal")	
		rst4("nieren") = Request.Form("nieren")	
		rst4("gyneaco") = Request.Form("gyneaco")	
		rst4("neurologisch") = Request.Form("neurologisch")	
		rst4("dermatologisch") = Request.Form("dermatologisch")	
		rst4("psycho") = Request.Form("psycho")	
		rst4("anderebehandeling") = Request.Form("anderebehandeling")	
		rst4("behand") = Request.Form("behand")	


rst4.Update


Response.Redirect "patientdetail.asp?origine=0&idcontact=" & Request ("idcontact") & ""

  elseif Request.Form("bsubmit") = "????????????" then



Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=" & Server.MapPath("maud_dejonghe.accdb")
Set rst4 = Server.CreateObject("ADODB.Recordset")
strsql4 = "SELECT * from contacts where idcontact= " & Cint("0" & Request ("idcontact"))
rst4.Open strsql4,adoCon,,3


		rst4("LastName")= Request.Form("name") 
		rst4("FirstName")= Request.Form("firstname")		
		rst4("phone")= Request.Form("phone")
		rst4("mobile")= Request.Form("mobile")		
		rst4("street")= Request.Form("street")
		rst4("nbr")= Request.Form("nbr")		
		rst4("cp")= Request.Form("cp")
		rst4("city")= Request.Form("city")		
		rst4("email")= Request.Form("email")
		rst4("comments")= Request.Form("comments")		
		rst4("sexe") = Request.Form("titel")	
		rst4("work")= Request.Form("work")		
		rst4("hobby") = Request.Form("hobby")	
		rst4("klacht")= Request.Form("klacht")
		rst4("medicatie")= Request.Form("medicatie")		
		rst4("operatie")= Request.Form("operatie")
		rst4("ongevallen")= Request.Form("ongevallen")		
		rst4("ziekte") = Request.Form("ziekte")	
		rst4("technischonderzoek")= Request.Form("technischonderzoek")		
		rst4("systeemanamnese") = Request.Form("systeemanamnese")	
		rst4("musculoskeletaal") = Request.Form("musculoskeletaal")	
		rst4("hart") = Request.Form("hart")	
		rst4("longen") = Request.Form("longen")	
		rst4("gastro") = Request.Form("gastro")	
		rst4("hormonaal") = Request.Form("hormonaal")	
		rst4("nieren") = Request.Form("nieren")	
		rst4("gyneaco") = Request.Form("gyneaco")	
		rst4("neurologisch") = Request.Form("neurologisch")	
		rst4("dermatologisch") = Request.Form("dermatologisch")	
		rst4("psycho") = Request.Form("psycho")	
		rst4("anderebehandeling") = Request.Form("anderebehandeling")	
		rst4("behand") = Request.Form("behand")	


rst4.Update

Response.Redirect "appointdetail.asp?origine=0&id=" & Request ("appid") & "&idcontact=" & Request ("idcontact") & ""


end if
%>

Open in new window

0
fedkris
Asked:
fedkris
1 Solution
 
nap0leonCommented:
Generally speaking, you don't want two submit buttons in one form... it can make things complicated.
Instead of using buttons, my suggestion would be to use an image of a button and place an "onclick=someJavaScriptFunction()" attribute onto each image.

This function would set the value of a hidden input on the page and then do the form post.

e.g.,
add to your form a hidden input:
<input type="hidden" name="whichSubmit" id=whichSubmit" value="" />

Open in new window


add "button" images to replace your existing submit buttons:
<img src="/images/submit_appointment.gif" alt="submit appointment" onclick="javascript:submitForm('appointment');"/>
<img src="/images/submit_patient.gif" alt="submit patient record" onclick="javascript:submitForm('patient');"/>

Open in new window


and your javascript function that sets the value of the hidden field and submits your form:
function submitForm(whichType){
  document.getElementById('whichSubmit').value = whichType;
  document.forms["myform"].submit();
}

Open in new window


When the form posts the information to your second page, you can use the value of Request.Form("whichSubmit") to determine which submit button was clicked.
0
 
sybeCommented:
Multiple submit buttons in a single form is no problem if you meet these conditions:
- they have the same name
- they have a different value
<form method="post" action="somepage.asp">
<input type="submit" name="submitbutton" value="button1">
<input type="submit" name="submitbutton" value="button2">
</form>

Open in new window


In somepage.asp you can find out which submit button is pressed
<%
Response.write Request.Form("submitbutton")
%>

Open in new window





0
 
fedkrisAuthor Commented:
thx
0
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.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now