Faire afficher les valeurs d'un bdd

Résolu
kyller_4432 Messages postés 45 Date d'inscription   Statut Membre Dernière intervention   -  
kyller_4432 Messages postés 45 Date d'inscription   Statut Membre Dernière intervention   -

Bonjour, 
j'aimerais pouvoir afficher sur ma page web les valeurs qui sont dans ma base de donnée quand on rentre le mois.

Ensuite pouvoir modifier les valeurs directement sur la page web 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="<?php echo base_url('/public/css/gsb.css'); ?>" />
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  </head>
  <body>
        <nav class="menu">
            <div class="profile">
                <a href= "accueil.php" class="img"><img class="logo" src="<?php echo base_url('/public/image/GSB.png'); ?>" profile photo></a>
            </div>
            <ul>
                <li><a href="index.php?action=Menu">Menu</a></li>
                <li class="deroulant">Fiche de frais &ensp;</a>
                <ul class="sous">
                    <li><a href="index.php?action=Note">Note de frais</a></li>
                    <li><a href="index.php?action=Fichedefrais">Voir mes fiches</a></li>
                </ul>
                <li><a href="index.php?action=Contact">Contact</a></li>
            </ul>
        </nav>
    <table>
        <p><strong><u>Frais Forfaitaire: </u></strong></p>
        <ul>
            <p>Dans le forfait de base vous avez:</p>
            <li>750km</li>
            <li>9 nuits d'hôtel</li>
            <li>12 repas</li>
        </ul>
        <form method="POST" action="index.php?action=Saisie">
        <label for="date">
            Date: <input type="month" id="name" name="date" minlength="1">
        </label>
        </br>
        </br>
        <label for="étape">
        Forfait étape:<input type="text" id="name" name="km" minlength="1">
        </label>
        </br>
        </br>
        <label for="nuit">
            Nuit hotel: <input type="number" id="name" name="nuit" minlength="1">
        </label>
        </br>
        </br>
        <label for= "repasResto">
            Repas : <input type="text" id="name" name="repasResto" minlength="1">
        </label>
        <p><strong><u>Frais hors forfait:</u></strong></p>
        <label for="libellé">
            Libéllé: <input type="text" id="name" name="libelle" minlength="1">
        </label>
        </br>
        </br>
        <label for="montant">
            Montant:<input type="number" id="name" name="Montant" minlength="1">
        </label>
        <input type="submit" id="envoie" name="envoie" value="Valider">
        </form>
</table>
    
    
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="gsb.js"></script>
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>
function modif_note(Quantite)
{
	
    //alert (Quantite);
	
	$.ajax(
    {
	
	async:		false,
	type:		"GET",
	url:		"Modele.php",
	//data:		'technicien=' +technicien + '&date_modifiee=' +date + '&duree=' +nb_heures + '&inter=' +inter,
	data: 		'&QtePiece=' +Quantite,
	success:	function(html){
            //alert (html);
			//$("#essai").html(html);
            suivi_tableau();
        }
    });
}

2 réponses

jordane45 Messages postés 38486 Date d'inscription   Statut Modérateur Dernière intervention   4 752
 

Bonjour,

Et quel est le souci ?


0
kyller_4432 Messages postés 45 Date d'inscription   Statut Membre Dernière intervention  
 

je n'arrive pas a récupérer mes valeurs

0
jordane45 Messages postés 38486 Date d'inscription   Statut Modérateur Dernière intervention   4 752 > kyller_4432 Messages postés 45 Date d'inscription   Statut Membre Dernière intervention  
 

Commence par ajouter la méthode "error" dans ton appel ajax

et regarde dans la console ( de préférence en utilisant firefox et après avoir pensé à activer le debug du xhr ) ce que ton appel ajax retourne.

0
kyller_4432 Messages postés 45 Date d'inscription   Statut Membre Dernière intervention  
 

Nickel merci j'ai réussi a débloquer

0