Problème WEB pour un expert
Bonjour, j'ai développer un site web qui marche parfaitement sur un serveur web, mais qui en localhost pose problème pour:
1 - le css qui décale des éléments ( bouton et balise nav par exemple )
2 - Corrompt les liens de tout mes boutons en rechargent la page avec le "name" de 2 de mes inputs
C'est le second problème que j'essaie de résoudre, pour préciser je peut faire fonctionner les liens/effets des boutons en les "spamants" et quand je supprime les 2 inputs de la page elle se recharge quand même sans la valeur des "names".
Le css n'est pas la cause du problème car si je supprime le lien vers celui-ci mon problème est toujours la.
Cela vous aidera peut-être, voici mon code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
<!DOCTYPE html charset=iso-8859-1 >
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="X-UA-Compatible" content="IE-11">
<meta http-equiv="X-UA-Compatible" content="IE-8">
<meta http-equiv="X-UA-Compatible" content="IE-9">
<meta http-equiv="X-UA-Compatible" content="IE-7">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<meta content="fr" http-equiv="Content-Language">
<link href="SiteBDD.txt" rel="stylesheet" media="all" type="text/css">
<title> Consultation BDD </title>
<script language="javascript" src="cal2.js"></script>
<script language="javascript" src="cal_conf2.js"></script>
<style type="text/css">
.auto-style1
{
margin-top: 0px;
}
</style>
</head>
<body style="width: 690px; height: 10px;">
<h1 style="width: 607px">Serres de Jansau</h1>
<form id="form1" name="sampleform" runat="server" style="width: 598px; height: 49px">
<button id="ButtonAccueil" onclick="location.href='SiteBDDAccueil.html'">
Accueil
</button>
<button id="ButtonBDD" onclick="location.href='SiteBDDBDD.php?choix=BDD0'">
Base de données
</button>
<button id="ButtonInfosBlocs" onclick="location.href='SiteBDDInformation.php?choix=BDD0'">
Informations des blocs
</button>
<button id="ButtonMod" onclick="location.href='SiteBDDMod.html'">
Consigne/Mod
</button>
<button id="ButtonHelp" onclick="location.href='SiteBDD.php?choix=Help'" >
?
</button>
<p style="height: 0px">
Entre:
<input type="text" name="firstinput" readonly="true" style="height: 19px; width: 87px"> </> <small><a href="javascript:showCal('Calendar1')" > <img src="calendar.jpg" id="firstDate" border="0" height="16" width="22"></a></small>
Et :
<input type="text" name="secondinput" readonly="true" style="height: 19px; width: 87px"> </> <small><a href="javascript:showCal('Calendar2')"><img src="calendar.jpg" id="firstDate" border="0" height="16" width="22"></a></small>
<button id="ButtonRecherche" > Rechercher </button>
</p>
<ul id="navbloc">
<li onclick="location.href='SiteBDDBDD.php?choix=BDD1'" > Bloc 1 </li>
<li onclick="location.href='SiteBDDBDD.php?choix=BDD2'" > Bloc 2 </li>
<li onclick="location.href='SiteBDDBDD.php?choix=BDD3'" > Bloc 3 </li>
<li onclick="location.href='SiteBDDBDD.php?choix=BDD4'" > Bloc 4 </li>
<li onclick="location.href='SiteBDDBDD.php?choix=BDD5'" > Bloc 5 </li>
<li onclick="location.href='SiteBDDBDD.php?choix=BDD6'" > Bloc 6 </li>
<li onclick="location.href='SiteBDDBDD.php?choix=BDD7'" > Bloc 7 </li>
</ul>
<?php
//=====================================================================
//Connection à la base de données du serveur wamp
try
{
$bdd = mysqli_connect( "localhost", "root", "", "serre");
}
catch (Exception $e)
{
die ('Erreur : '. $e->getMessage());
}
//======================================================================
// Création du tableau de base, vide.
print ("<table id='tableau'> <TR> <TH> Date </TH> <TH> Température: ext/int/bacs </TH> <TH> Consigne: int/bacs </TH> </TR> </table>");
print("<script> var table = document.getElementById('tableau') </script>");
//=======================================================================================================================
if ($_GET["choix"] == "BDD0")
{
}
if ($_GET["choix"] == "BDD1")
{
// sélection de la table souhaité
$resultat = mysqli_query($bdd, 'SELECT * FROM `donneebloc1` ');
while($donnees = mysqli_fetch_assoc($resultat))
{
print ("<script> var row = table.insertRow( 1 );");
print ("var cell1 = row.insertCell(0); var cell2 = row.insertCell(1); var cell3 = row.insertCell(2);</script> ");
$donneesCell1 = $donnees['date'];
$TempAmb = $donnees['temp_ambiante'];
$TempBacs = $donnees['temp_bac_culture'];
$Cellu2 = "/" . $TempAmb . "/" . $TempBacs;
$donneesCell2 = $Cellu2;
$ConsAmb = $donnees['ConsigneTempAmbiante'];
$ConsBacs = $donnees['ConsigneTempBacculture'];
$Cellu3 = $ConsAmb . "/" . $ConsBacs;
$donneesCell3 = $Cellu3;
print(" <script> cell1.innerHTML = '$donneesCell1';" );
print(" cell2.innerHTML = '$donneesCell2'; ");
print(" cell3.innerHTML = '$donneesCell3'; </script> ");
}
mysqli_free_result($resultat);
// Création des 2 boutons
print("<button id='ButtonDétails' onclick=\"location.href='SiteBDDDétails.php?choix=BDD1'\"> Détails </button>");
print("<button id='ButtonGraphique' onclick=\"location.href='SiteBDDGraphique.php?choix=BDD1'\"> Graphique </button>");
}
?>
</form>
</body> |
bonne chance vous avez 4h ( et mon éternelle reconnaissance même si vous ne trouver que l'esquisse de l'idée d'un piste )