Mais mes pages asp sont au mêm endroi ke ma base, direcetemen sur un server web (wwwroot) de l'entreprise ou je fé mon stage.
En fait, je V te dire excatemen ce que je dois faire, dsl de t'ennuyer autan...
Je dois créer un logiciel de calcul visan a etre mi sur internet. Mais certaine donné de calcul sont tré raremen changé, ca qui signifie kil fo ke je les stock dan ma base qd l'utilisateur les rentre et ke je lui ressorte qd il revien la fois d'apré.
Le truc ou je bloqu c kil fo kil s'identifi mé uniquemen avec un numéro clien, san mot de pass et ke si le compte existe, ca lui fourniss ses donnée saisi préalablemen et ke sil n'existe pa, le compte se créer avec aucune valeur (ell attende de se faire saisir)
Voila tou ce que g a faire
Je te donn mes page, des foi ke tu ai le ten di jeté un cou d'oeil
Page1.asp
<HTML>
<HEAD>
<META NAME="Calcul" Content="Microsoft Visual Studio 6.0">
<script language="JavaScript">
function calc() {
if ((document.formulaire.Im.value)&&(document.formulaire.Im0.value)&&(document.formulaire.PrixInit.value)){
document.formulaire.K.value = (document.formulaire.K1.value)*1 + (document.formulaire.K2.value * (document.formulaire.Im.value / document.formulaire.Im0.value))*1 ;
document.formulaire.PrixF.value = document.formulaire.K.value * document.formulaire.PrixInit.value ;
}
else {
alert('Veuillez renseigner tout les champs svp');
}
}
function redirec() {
window.location="iden.htm";
}
</script>
</HEAD>
<BODY>
<form name="formulaire" style="COLOR: black; BACKGROUND-COLOR: white">
<P style="BACKGROUND-COLOR: silver"><STRONG>Valeur
K1</STRONG> : <INPUT disabled
name=K1 value = <%=Request.Form("K1")%> >
<INPUT id=button1 onclick=redirec() type=button value="Modifier K1 et/ou K2" name=Redir></P>
<P style="BACKGROUND-COLOR: silver"><STRONG>Valeur
K2</STRONG> : <INPUT disabled name="K2" value = <%=Request.Form("K2")%> ></P>
<P style="BACKGROUND-COLOR: silver"><STRONG>Im </STRONG>
: <INPUT name="Im" >
</P>
<P style="BACKGROUND-COLOR: silver"><STRONG>Im0</STRONG>
: <INPUT name="Im0" >
</P>
<P style="BACKGROUND-COLOR: silver"><STRONG>Prix
Initial</STRONG> : <INPUT name="PrixInit" ></P>
<P> </P>
<P style="BACKGROUND-COLOR: silver">
<INPUT type=button value="CALCULER" name="Calc" OnClick=calc()></P>
<P> </P>
<P style="BACKGROUND-COLOR: silver"><STRONG>K est égal
à</STRONG> <INPUT name=K ></P>
<P style="BACKGROUND-COLOR: silver"><STRONG>Prix Final</STRONG> : <INPUT name="PrixF" ></P>
<P> </P>
<P style="BACKGROUND-COLOR: silver">
<INPUT type=reset value="Reset" name="reset" >
<input type="button" value="Imprimer cette page" onClick="window.print()"></P>
</form>
</BODY>
</HTML>
page2.asp
<HTML>
<HEAD>
<META NAME="Calcul2" Content="Microsoft Visual Studio 6.0">
<script language="JavaScript">
function test()
{
if ((document.formulaire2.K1.value)&&(document.formulaire2.K2.value))
{
}
else { alert('Veuillez renseigner tout les champs svp');
}
}
</script>
</HEAD>
<BODY>
<%
' connexion
Set conn = server.CreateObject ("ADODB.Connection")
Conn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.mapPath("database/base.mdb")
Set Rsbase = Server.CreateObject("ADODB.Recordset")
SQL="select * from T1"
rs.open SQL, conn, 3, 3
Rsbase.AddNew
Rsbase("idlog") = request("idlog")
Rsbase.Update
response.redirect "page2.asp"
%>
<form name="formulaire2" method="post" action="page1.asp" style="COLOR: black" >
<P style="BACKGROUND-COLOR: silver"><STRONG>Valeur
K1</STRONG> : <INPUT name =K1 ></P>
<P style="BACKGROUND-COLOR: silver"><STRONG>Valeur
K2 </STRONG> : <INPUT name =K2 ></P>
<P style="BACKGROUND-COLOR: silver">
<INPUT id=button1 type=submit value="Valider" name="button1" OnClick=test()></P>
<%
RSbase("K1") = Request("K1")
RSbase("K2") = Request("K2")
%>
</form>
</BODY>
</HTML>
ident.htm
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<form name="identification" action="page2.asp" method=post>
<table width="450" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="2" bgcolor="#99ccff"><font face="Arial, Helvetica, sans-serif" size="2" color="#000000">• <U>Entrez votre numéro client</U> : </font></td>
</tr>
<tr bgcolor="#ffffff">
<td valign="bottom" width="60%">
<div align="right"><font face="Arial, Helvetica, sans-serif" size="2" color="#000000">
Login : </font></div>
</td>
<td width="40%"> <font face="Arial, Helvetica, sans-serif" size="3" color="#000000">
<INPUT name="idlog" >
</font></td>
</tr>
<tr bgcolor="#ffffff">
<td valign="bottom" width="60%">
<div align="right"><font face="Arial, Helvetica, sans-serif" size="2" color="#000000">
</font></div>
</td>
<td width="40%"> <font face="Arial, Helvetica, sans-serif" size="3" color="#000000">
</font></td>
</tr>
<tr bgcolor="#ffffff">
<td valign="bottom" width="60%">
<div align="right"><font face="Arial, Helvetica, sans-serif" size="2" color="#000000">
<INPUT Type="reset" name="button2" value="Effacer">
</font></div>
</td>
<td width="40%"> <font face="Arial, Helvetica, sans-serif" size="3" color="#000000">
<INPUT Type="submit" name="Submit" value="Identifier">
</font></td>
</tr>
</table>
</form>
</BODY>
</HTML>
C long je C mais tu y verra mieu comm ca..Si tu na pa le ten, ne t'embete pa, je finirai bien par trouvé mais c vré ke ton aide me feré avancé suremen plu rapidemen
Autr info, ma base ne contien ke 2champ, idlog, K1 et K2
Voila, merci si tu me sor de se petrin
Et bonn journé a toi aussi
++
