<%
int id=Integer.parseInt(request.getParameter("id"));
String photo ="";
try{
Class.forName("com.mysql.jdbc.Driver");
String req = "select * from photovol where idvols="+id;
// connection base
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/guidegate?autoReconnect=true&useSSL=false","root","admin");
// bibliotheque pour executer les requetes
Statement stt = con.createStatement();
//execution requete
ResultSet rs=stt.executeQuery(req);
while(rs.next()){
photo=rs.getString(2);
%>
<%
}
}
catch(Exception e){
System.out.print(e.toString());
}
%>
<%
int id1=Integer.parseInt(request.getParameter("id"));
String depart = "";
int prix = 0;
String arriver ="";
String datedepart ="";
String datearriver = "";
String classe ="";
int idagence=0;
try{
Class.forName("com.mysql.jdbc.Driver");
String req = "select * from vols where idvols="+id1;
// connection base
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/guidegate?autoReconnect=true&useSSL=false","root","admin");
// bibliotheque pour executer les requetes
Statement stt = con.createStatement();
//execution requete
ResultSet rs=stt.executeQuery(req);
while(rs.next()){
depart = rs.getString(2);
prix = rs.getInt(4);
arriver=rs.getString(3);
datedepart=rs.getString(5);
datearriver=rs.getString(6);
classe=rs.getString(7);
idagence=rs.getInt(9);
}
}
catch(Exception e){
System.out.print(e.toString());
}
%>
<%
String Nom="";
String requet = "select * from agence where idagence="+idagence;
// connection base
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/guidegate?autoReconnect=true&useSSL=false","root","admin");
// bibliotheque pour executer les requetes
Statement sttt = conn.createStatement();
//execution requete
ResultSet rs1=sttt.executeQuery(requet);
while(rs1.next()){
Nom = rs1.getString(2);
}
%>
Depart :<%= depart %> Arriver :<%= arriver %>
Agence : <%=Nom%>
Prix : <%= prix %> Dinars
Date de depart : <%= datedepart %> Date d arriver : <%= datearriver %>
<%=classe%>