Problème de tableau

Résolu
Jr -  
 Jr -
Bonjour, j'ai un problème avec mon code je pense parce que je veux créer un tableau HTML dans lequel je pourrais inscrire des valeurs directement depuis le site internet mais le problème est qu'avec mon code, seul le tableau est crée et je ne peux mettre des valeurs à l'intérieur depuis le site.

Merci de répondre rapidement

Cordialement



Code :
<style type="text/css">
.tg  {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
.tg .tg-yw4l{vertical-align:top}
</style>
<table class="tg">
  <tr>
    <th class="tg-031e">Horaires</th>
    <th class="tg-031e">Lundi</th>
    <th class="tg-031e">Mardi</th>
    <th class="tg-031e">Mercredi</th>
    <th class="tg-031e">Jeudi</th>
    <th class="tg-yw4l">Vendredi</th>
  </tr>
  <tr>
    <td class="tg-031e">H1</td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-yw4l"></td>
  </tr>
  <tr>
    <td class="tg-yw4l">H2</td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
  </tr>
  <tr>
    <td class="tg-031e">H3</td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-yw4l"></td>
  </tr>
  <tr>
    <td class="tg-031e">H4</td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-yw4l"></td>
  </tr>
  <tr>
    <td class="tg-031e">M1</td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-yw4l"></td>
  </tr>
  <tr>
    <td class="tg-031e">M2</td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-031e"></td>
    <td class="tg-yw4l"></td>
  </tr>
  <tr>
    <td class="tg-yw4l">H5</td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
  </tr>
  <tr>
    <td class="tg-yw4l">H6</td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
  </tr>
  <tr>
    <td class="tg-yw4l">H7</td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
  </tr>
  <tr>
    <td class="tg-yw4l">H8</td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
  </tr>
  <tr>
    <td class="tg-yw4l">S1</td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
  </tr>
  <tr>
    <td class="tg-yw4l">S2</td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
    <td class="tg-yw4l"></td>
  </tr>
</table>

EDIT : Ajout des balises de code

A voir également:

1 réponse

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


Deux solutions :
- Ajouter des champs INPUT dans tes cellules
- Utiliser le "contenteditable" du html5


Si par la suite tu veux pouvoir "sauvegarder" ces données (celles que tu auras saisi dans ton tableau....) tu devras utiliser, en complément du html, un langage serveur (comme le PHP ) ainsi qu'éventuellement (pour le contenteditable du moins) du Javascript.

1
Jr
 
Bonjour de nouveau,

Avec la création de ce formulaire, je voudrais me connecter à ma base de données pour qu'elle me renvoie : "Bonjour (nom), bienvenu sur le site". Mais le problème est que j'en ai aucune idée de comment faire un formulaire pour récupérer ces informations dans la base de données


Voici le code de mon formulaire avec lequel je veux me connecter dans ma base de données :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>TutoConnect</title></head><body background="lycee.jpg">
<header class="header_accueil">
</header><div style="text-align: center; font-family: Candara;" class="texte_header"><big><big><big><br>
<span style="font-family: Gill Sans Ultra Bold;">Lycée Ste Marie, Cholet</span></big></big></big></div>

<article class="connexion">
</article><form method="post" action="cible_connexion.php"><div style="text-align: center;" class="mail">
<input class="input_mail" name="mail" placeholder="MAIL" type="text"><span style="font-family: Helvetica,Arial,sans-serif;">@saintemarie-cholet.eu</span></div>


<div style="text-align: center;"><input class="input_pwd" name="pwd" placeholder="MOT DE PASSE" type="password">
<br>
</div>


<div style="text-align: center;"><input class="myButton" name="Connexion" value=" Se connecter " type="submit">
<br>

</div>
</form>


<article class="connexion">
</article><p style="text-align: center; font-weight: bold;"><big>Pas encore inscrit ? Créez votre compte en cliquant sur créer un compte.</big> </p>

<div style="text-align: center;"><big><a href="Creationcompte.html" rel="nofollow noopener noreferrer" target="_blank" class="myButton">Créer un compte</a></big></div>



</body></html>
0
jordane45 Messages postés 38486 Date d'inscription   Statut Modérateur Dernière intervention   4 752 > Jr
 
https://www.commentcamarche.net/contents/793-php-recuperation-de-donnees

https://www.commentcamarche.net/contents/493-formulaires-html-cours-et-exemples

https://www.commentcamarche.net/faq/44117-connexion-a-une-base-avec-pdo-mysqli
0
Jr > jordane45 Messages postés 38486 Date d'inscription   Statut Modérateur Dernière intervention  
 
Merci beaucoup
0