CONNEXION
  • RetourJeux
    • Sorties
    • Hit Parade
    • Les + populaires
    • Les + attendus
    • Soluces
    • Tous les Jeux
    • Gaming
  • RetourActu Gaming
    • News
    • Astuces
    • Tests
    • Previews
    • Toute l'actu gaming
  • RetourBons plans
    • Bons plans
    • Bons plans Smartphone
    • Bons plans Hardware
    • Bons plans Image et Son
    • Bons plans Amazon
    • Bons plans Cdiscount
    • Bons plans Decathlon
    • Bons plans Fnac
    • Tous les Bons plans
  • RetourJVTech
    • Actus High-Tech
    • Intelligence Artificielle
    • Smartphones
    • Mobilité urbaine
    • Hardware
    • Image et son
    • Tutoriels
    • Tests produits High-Tech
    • Guides d'achat High-Tech
    • JVTech
  • RetourCulture
    • Actus Culture
    • Culture
  • RetourVidéos
    • A la une
    • Gaming Live
    • Vidéos Tests
    • Vidéos Previews
    • Gameplay
    • Trailers
    • Chroniques
    • Replay Web TV
    • Toutes les vidéos
  • RetourForums
    • Hardware PC
    • PS5
    • Switch 2
    • Xbox Series
    • Switch
    • Pokemon pocket
    • FC 25 Ultimate Team
    • League of Legends
    • Tous les Forums
  • PC
  • PS5
  • Xbox Series
  • Switch 2
  • PS4
  • One
  • Switch
  • iOS
  • Android
  • MMO
  • RPG
  • FPS
En ce moment Genshin Impact Valhalla Breath of the wild Animal Crossing GTA 5 Red dead 2
Liste des sujets

affichage load

NeDisJamais
NeDisJamais
Niveau 2
08 juillet 2006 à 21:57:00

il me reste quelque pb pour mon services...

voici une page avec un formulaire bdd...

<html>
<head><title>administration</title>

<style>
<!--
A:link {text-decoration: none; color: #d8d8ff; font-family: Times New Roman, Arial; font-size: 12pt}
A:visited {text-decoration: none; color: #ffffff; font-family: Times New Roman, Arial; font-size: 12pt}
A:active {text-decoration: none; color: #ff0000; font-family: Times New Roman, Arial; font-size: 12pt}
A:hover {text-decoration: none; color: #ff0000; font-size: 12pt}
-->
</style>

<style>
.td {font-size:11px; border:1px solid #242424; background:url(´dnf/i/in_b.gif´); padding:2px}
.td {letter-spacing:1; font-size:11; font-weight: bold; background-color:#303030; padding:1px}
.td {letter-spacing: 1; font-size: 11; font-weight: bold; background-color:#3A3A3A; padding:1px; }
</style>

<style>

h1
{
background-color: 000000;
color:#ffffff;
cursor:url(xbox.cur);
}
h2
{
background-color: 0099ff;
color:#000000;
font-size: 14px;
}
h3
{
background-color: 3399cc;
color:#ff0000;
font-size: 14px;
font-style: italic;
content: "prout";
}
h4
{
background-color: 333333;
color:#ff0000;
font-size: 14px;
font-style: italic;
content: "prout";
}
.div
{
background-color: ffffff;
}
</style>
</head>

<body
background="
http://www.fond-ecran-image.com/jeu-vi
deo/fond-ecran-halo/0838.jpg" style="background-repeat:no-repeat;">

<div style="background-color:#333333; padding:10pt; border:thin solid black; width:100%; cursor:url(cursor.gif);"><p align="center"><font color="#ffffff">DIGIforum ouverture. Damien fletty &co matthieu haguet.</font></p></div>

<p align="left"> </p>

<h3><font color="#ffffff"><p align="center"><img src="images/xbox.gif"><a href="*">Inscription</a> | <img src="images/ps2.gif"><a href="*">profil</a> | <img src="images/nintendods.gif"><a href="*">recherche</a> | <img src="images/gamecube.gif"><a href="*">smilies</a> | <img src="images/xbox360.gif"><a href="*">chat</a></p></font></h3>

<p align="left"> </p>
<p align="left"> </p>

<div style="background-color:#333333; padding:10pt; border:thin solid black; width:100%; cursor:url(cursor.gif);"><p align="center"><h3><center>Zone d´administration</center></h3></p>
<div><font color="#ffffff">Vous voila dans la zone d´administration de configurations de votre digiforum.</font></div></div>

<p align="left"> </p>
<p align="left"> </p>
<p align="left"> </p>

<p align="left"> </p>

<div style="background-color:#333333; padding:10pt; border:thin solid black; width:100%; cursor:url(cursor.gif);"><p align="center"><h3><center>Zone d´administration</center></h3></p>
<div>

<?php
if (isset($_POST[´pseudo´]) AND isset($_POST[´logo
´])) // Si les variables existent
{
if ($_POST[´pseudo´] != NULL AND $_POST[´titr
e´] != NULL) // Si on a quelque chose à enregistrer
{
// D´abord, on se connecte à MySQL
mysql_connect("localhost", "--", "--");
mysql_select_db("matyforum_db");

// On utilise la fonction PHP htmlentities
pour éviter d´enregistrer du code HTML dans la table
$message = htmlentities ($_POST[´logo´]);
$pseudo = htmlentities ($_POST[´titre´]);

// Ensuite on enregistre le message
mysql_query("INSERT INTO apparences VALUES
(´$logo´, ´$titre´, ´$description´)");

// On se déconnecte de MySQL
mysql_close();
}
}

// Que l´on ait enregistré des données ou pas...
// On affiche le formulaire puis les 10 derniers m
essages

// Tout d´abord le formulaire :
?>

<form action="m16.forum2.php" method="post">

<p>
logo : <input type="text" name="logo" /><br />
titre : <input type="text" name="titre" /><br />
description : <input type="text" name="descriptio
n" /><br />

<input type="submit" value="Envoyer" />
</p>

</form>

sa raméne sur une page que voici :

<html>
<head><title>service de forums gratuit</title>

<style>
<!--
A:link {text-decoration: none; color: #d8d8ff; font-family: Times New Roman, Arial; font-size: 12pt}
A:visited {text-decoration: none; color: #ffffff; font-family: Times New Roman, Arial; font-size: 12pt}
A:active {text-decoration: none; color: #ff0000; font-family: Times New Roman, Arial; font-size: 12pt}
A:hover {text-decoration: none; color: #ff0000; font-size: 12pt}
-->
</style>

<style>
.td {font-size:11px; border:1px solid #242424; background:url(´dnf/i/in_b.gif´); padding:2px}
.td {letter-spacing:1; font-size:11; font-weight: bold; background-color:#303030; padding:1px}
.td {letter-spacing: 1; font-size: 11; font-weight: bold; background-color:#3A3A3A; padding:1px; }
</style>

<style>

h1
{
background-color: 000000;
color:#ffffff;
cursor:url(xbox.cur);
}
h2
{
background-color: 0099ff;
color:#000000;
font-size: 14px;
}
h3
{
background-color: 3399cc;
color:#ff0000;
font-size: 14px;
font-style: italic;
content: "prout";
}
h4
{
background-color: 333333;
color:#ff0000;
font-size: 14px;
font-style: italic;
content: "prout";
}
.div
{
background-color: ffffff;
}
</style>
</head>

<?php

// Maintenant on doit récupérer les 10 dernières e
ntrées de la table
// On se connecte d´abord à MySQL :
mysql_connect("localhost", "--", "--");
mysql_select_db("matyforum_db");

// On se déconnecte de MySQL
mysql_close();

// Puis on fait une boucle pour afficher tous les
résultats :
while ($donnees = mysql_fetch_array($reponse) )
{
?>

<b><?php echo $donnees[´titre´]; ?> </b>

<body background="<?php echo $donnees[´logo´]; ?> " style="background-repeat:no-repeat;">

<div style="background-color:#333333; padding:10pt; border:thin solid black; width:100%; cursor:url(cursor.gif);"><p align="center"><font color="#ffffff"><?php echo $donnees[´titre´]; ?> </font></p></div>

<p align="left"> </p>

<h3><font color="#ffffff"><p align="center"><img src="images/xbox.gif"><a href="*">Inscription</a> | <img src="images/ps2.gif"><a href="*">profil</a> | <img src="images/nintendods.gif"><a href="*">recherche</a> | <img src="images/gamecube.gif"><a href="*">smilies</a> | <img src="images/xbox360.gif"><a href="*">chat</a></p></font></h3>

<p align="left"> </p>
<p align="left"> </p>

<div style="background-color:#333333; padding:10pt; border:thin solid black; width:100%; cursor:url(cursor.gif);"><p align="center"><h3><center>New Du Forum</center></h3></p>
<div><font color="#ffffff">Le forum ouvert. Laissez vos questions, <font
color="#0099ff">matrix009@hotmail.fr</font></font>
</div></div>

<p align="left"> </p>
<p align="left"> </p>
<p align="left"> </p>

<p align="left"> </p>

<table width="100%" cellspacing="0" cellpadding="2">
<tr>
<h3><td style="border-top: 1px #ffffff solid;border-left: 1px #ffffff solid;border-right: 1px #ffffff solid;border-bottom: 1px #ffffff dotted;width:100%" class="text" valign="top"></h4>
<b><em><img src="images/content.gif"> | <font color="#ff0000">Suj</font><font color="#333333">et</font></em></b>
</b></td>
<td class="text" style="border-top: 1px #ffffff solid;border-bottom: 1px #ffffff dotted;border-right: 1px #ffffff solid;width:50%" valign="top"></td>
</tr>

<table width="100%" cellspacing="0" cellpadding="2">
<tr>
<td style="border-top: 1px #ffffff solid;border-left: 1px #ffffff solid;border-right: 1px #ffffff solid;border-bottom: 1px #ffffff dotted;width:100%" class="text" valign="top">
<font color="#ccc333"><em>DiGiForum :</em></font>
</b></td>
<td class="text" style="border-top: 1px #000000 solid;border-bottom: 1px #000000 dotted;border-right: 1px #000000 solid;width:50%" valign="top"></td>
</tr>

<table width="100%" cellspacing="0" cellpadding="2">
<tr>
<h4><td style="border-top: 1px #ffffff solid;border-left: 1px #ffffff solid;border-right: 1px #ffffff solid;border-bottom: 1px #ffffff dotted;width:100%" class="text" valign="top"></h4>
<font color="#"><a href="*"><?php echo $donnees[´titre´]; ?> </a>
<div>problème rencontré sur le forum</div></font>
</b></td>
<td class="text" style="border-top: 1px #000000 solid;border-bottom: 1px #000000 dotted;border-right: 1px #000000 solid;width:50%" valign="top"></td>
</tr>

<?php
}
// Fin de la boucle, le script est terminé !
?>

// On se déconnecte de MySQL
mysql_close();

<table width="100%" cellspacing="0" cellpadding="2
">
<tr>
<td style="border-top: 1px #ffffff solid;border-left: 1px #ffffff solid;border-right: 1px #ffffff solid;border-bottom: 1px #ffffff dotted;width:100%" class="text" valign="top">
<font color="#"><a href="*">La F.A.Q</a>
<div>questions/réponses</div></font>
</b></td>
<td class="text" style="border-top: 1px #000000 solid;border-bottom: 1px #000000 dotted;border-right: 1px #000000 solid;width:50%" valign="top"></td>
</tr>

<table width="100%" cellspacing="0" cellpadding="2">
<tr>
<td style="border-top: 1px #ffffff solid;border-left: 1px #ffffff solid;border-right: 1px #ffffff solid;border-bottom: 1px #ffffff dotted;width:100%" class="text" valign="top">
<font color="#"><a href="*">Aide forum</a>
<div>Les aides pour votre forum</div></font>
</b></td>
<td class="text" style="border-top: 1px #000000 solid;border-bottom: 1px #000000 dotted;border-right: 1px #000000 solid;width:50%" valign="top"></td>
</tr>

<h3><table width="100%" cellspacing="0" cellpadding="2">
<tr>
<td style="border-top: 1px #ffffff solid;border-left: 1px #ffffff solid;border-right: 1px #ffffff solid;border-bottom: 1px #ffffff dotted;width:100%" class="text" valign="top">
<font color="#ccc333"><em>Discussion :</em></font>
</b></td>
<td class="text" style="border-top: 1px #000000 solid;border-bottom: 1px #000000 dotted;border-right: 1px #000000 solid;width:50%" valign="top"></td>
</tr></h3>

<table width="100%" cellspacing="0" cellpadding="2">
<tr>
<td style="border-top: 1px #ffffff solid;border-left: 1px #ffffff solid;border-right: 1px #ffffff solid;border-bottom: 1px #ffffff dotted;width:100%" class="text" valign="top"></h4>
<font color="#"><a href="*">Programmation</a>
<div>aides pour votre site web</div></font>
</b></td></h4>
<td class="text" style="border-top: 1px #000000 solid;border-bottom: 1px #000000 dotted;border-right: 1px #000000 solid;width:50%" valign="top"></td>
</tr>

<table width="100%" cellspacing="0" cellpadding="2">
<tr>
<h4><td style="border-top: 1px #ff0000 solid;border-left: 1px #ff0000 solid;border-right: 1px #ff0000 solid;border-bottom: 1px #ff0000 dotted;width:100%" class="text" valign="top">
<font color="#"><a href="*">Bar & café</a>
<div>discutez de tout et de rien</div></font>
</b></td></h4>
<td class="text" style="border-top: 1px #000000 solid;border-bottom: 1px #000000 dotted;border-right: 1px #000000 solid;width:50%" valign="top"></td>
</tr>

<hr>

<h3><TD width="50%" "height="50%" style="border-style: solid; border-width: 1; padding-left: 0; padding-right: -1" bordercolor="#ff0000" valign="top" rowspan="2">
<p style="MARGIN: 2px 5px" align="center">
<p align="left"><img src="images/online.jpg"> | <font size="3">ONLINE</font></p>
<div><h3>
<?php
// Connexion à MySQL
mysql_connect("localhost", "--", "--");
mysql_select_db("matyforum_db");

// -------
// ETAPE 1 : on vérifie si l´IP se trouve déjà dan
s la table
// Pour faire ça, on n´a qu´à compter le nombre d´
entrées dont le champ "ip" est l´adresse ip du visiteur
$retour = mysql_query(´SELECT COUNT(*) AS nbre_entrees FROM visites WHERE ip=´´ . $_SERVER[´REMOTE_ADDR´] . ´´´);
$donnees = mysql_fetch_array($retour);

if ($donnees[´nbre_entrees´] == 0) // L´ip ne se t
rouve pas dans la table, on va l´ajouter
{
mysql_query(´INSERT INTO connectes VALUES(´´ . $_SERVER[´REMOTE_ADDR´] . ´´, ´ . time() . ´)´);
}
else // L´ip se trouve déjà dans la table, on met
juste à jour le timestamp
{
mysql_query(´UPDATE connectes SET timestamp=´ . time() . ´ WHERE ip=´´ . $_SERVER[´REMOTE_ADDR´] . ´´´);
}

// -------
// ETAPE 2 : on supprime toutes les entrées dont l
e timestamp est plus vieux que 5 minutes

// On stocke dans une variable le timestamp qu´il
était il y a 5 minutes :
$timestamp_5min = time() - (60 * 5); // 60 * 5 = n
ombre de secondes écoulées en 5 minutes
mysql_query(´DELETE FROM connectes WHERE timestamp < ´ . $timestamp_5min);

// -------
// ETAPE 3 : on compte le nombre d´ip stockées dan
s la table. C´est le nombre de visiteurs connectés
$retour = mysql_query(´SELECT COUNT(*) AS nbre_entrees FROM visites´);
$donnees = mysql_fetch_array($retour);

// Ouf ! On n´a plus qu´à afficher le nombre de c
onnectés !
echo ´<p>Il y a actuellement ´ . $donnees[´nbre_entrees´] . ´ visiteurs connectés sur ce forum !< /p>´;
?>
</h3></div>
<TR>
<TD COLSPAN=2 width="779">
</TD>
</TR></h3>

</body>
</html>

théoriquement sa doit affiché les 3 critéres que rentre le visiteurs ! mais nan, les endroit ou jai mis les balises pour afficher par ex la valeur $titre, la ou jai mis la balises ce qui été a cet endroit la à disparu ! pareil pour les 2 autre critéres !

alors pk sa disparait comme sa et pk rien ne safiche ?

merci d´avance

dnob700
dnob700
Niveau 10
09 juillet 2006 à 09:24:40

lire un truc comme ça, c´est assez difficile. Ce qu´il faudrait c´est que tu renvoie le même code mais sans les balises HTML : juste la partie PHP.
Et tu mets des [...] partout où il y avait du html. Comme ça on pourra déjà bien mieux suivre ton code.

LGV
LGV
Niveau 28
09 juillet 2006 à 13:10:44

et paster sur un wall (genre rafb.net) pour avoir l´indentation et coloration syntaxique

Yoda_Software
Yoda_Software
Niveau 30
09 juillet 2006 à 21:30:32

Je vois qu´il fait preuve d´autant de politesse que sur le forum ´Création de sites web´ :rire:
Et ça ne lui a pas plus qu´on lui fasse remarquer. :nah:

Yoda_Software
Yoda_Software
Niveau 30
09 juillet 2006 à 21:32:08

C´est moi, ou l´affichage de son code se fait avec des couleurs bleu et rouge et par moment est affiché sous forme d´un lien :question:

Sous forums
  • Aide à l'achat Mac
  • Macintosh
  • Création de Jeux
  • Programmation
  • Création de sites web
  • Linux
  • Internet
  • Steam Deck
  • Hardware
La vidéo du moment