<%
int prixvol =0;
int prixvoi = 0;
//// hotellll
String HT[];
HT = new String[2];
int PTH[];
PTH = new int[2];
/// vol
String VT[];
VT = new String[2];
int PTV[];
PTV= new int[2];
/// voiture
String VoT[];
VoT = new String[2];
int PTVo[];
PTVo= new int[2];
/////
String depart= request.getParameter("depart");
String arriver= request.getParameter("arriver");
String ville= request.getParameter("ville");
String voiture= request.getParameter("voiture");
String nom ="";
// String description ="";
// String adresseh="";
// String imgh ="";
// int cat = 0;
int prixh = 0;
String idhotel="";
String Modele = "";
String imgvoi ="";
String descriptionvoi ="";
String Energie = "";
String Matricule ="";
String Silhouette ="";
String Couleur ="";
String idvoiture="";
String adressevoi="";
// String depart = "";
int privol = 0;
String imgvol ="";
// String arriver ="";
String datedepart ="";
String id="";
String datearriver = "";
String classe ="";
// out.print("
Hotel
Vol
Voiture");
try{
Class.forName("com.mysql.jdbc.Driver");
String req = "select * from vols where depart like ('%"+depart+"%') and arriver like ('%"+arriver+"%') order by prix asc limit 2";
//out.print(req);
String req1 = "select * from hotel where Adresse like ('%"+ville+"%') order by prix asc limit 2";
// out.print(req1);
String req2 = "select * from voiture where adresse like ('%"+ville+"%') order by prix asc limit 2";
Connection con1 = DriverManager.getConnection("jdbc:mysql://localhost:3306/guidegate?autoReconnect=true&useSSL=false","root","admin");
Statement stt1 = con1.createStatement();
ResultSet rs1=stt1.executeQuery(req1);
int prixoffre =0;
int i = 0;
while(rs1.next()){
HT[i]= rs1.getString(2);
PTH[i]= rs1.getInt(8);
i++;
}
System.out.print(i);
Connection con2 = DriverManager.getConnection("jdbc:mysql://localhost:3306/guidegate?autoReconnect=true&useSSL=false","root","admin");
Statement stt2 = con2.createStatement();
ResultSet rs2=stt2.executeQuery(req2);
int y = 0;
while(rs2.next()){
VoT[y]= rs2.getString(3);
PTVo[y]= rs2.getInt(7);
y++;
}
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/guidegate?autoReconnect=true&useSSL=false","root","admin");
Statement stt = con.createStatement();
ResultSet rs=stt.executeQuery(req);
int m = 0;
while(rs.next()){
VT[m]= rs.getString(1);
PTV[m]= rs.getInt(4);
m++;
}
out.print("