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

GraphiColas (GC)

qc_food
qc_food
Niveau 10
11 juillet 2003 à 22:42:51

ok !

bobcolas
bobcolas
Niveau 9
12 juillet 2003 à 10:14:26

l´index.php

< ?php require_once(´Connections/conn_blog.php´); ? >
< ?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = " ", $theNotDefinedValue = " ")
{
$theValue = ( !get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

switch ( $theType) {
case " text":
$theValue = ( $theValue ! = " ") ? " ´" . $theValue . " ´" : " NULL";
break;
case " long":
case " int":
$theValue = ( $theValue ! = " ") ? intval($theValue) : " NULL";
break;
case " double":
$theValue = ( $theValue ! = " ") ? " ´" . doubleval($theValue) . " ´" : " NULL";
break;
case " date":
$theValue = ( $theValue ! = " ") ? " ´" . $theValue . " ´" : " NULL";
break;
case " defined":
$theValue = ( $theValue ! = " ") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}

$editFormAction = $HTTP_SERVER_VARS[´PHP_SELF´];
if ( isset($HTTP_SERVER_VARS[´QUERY_STRING´])) {
$editFormAction . = " ?" . $HTTP_SERVER_VARS[´QUERY_STRING´];
}

if ( (isset($HTTP_POST_VARS["MM_insert"])) && ( $HTTP_POST_VARS["MM_insert"] == " form1")) {
$insertSQL = sprintf("INSERT INTO blog ( name, text) VALUES ( %s, %s)",
GetSQLValueString($HTTP_POST_VARS[´name´], " text"),
GetSQLValueString($HTTP_POST_VARS[´text´], " text"));

mysql_select_db($database_conn_blog, $conn_blog);
$Result1 = mysql_query($insertSQL, $conn_blog) or die(mysql_error());
}
? >
< html>
< head>
< title>..:: ][ GraphiColas ][ ::..</title>
< meta content="photoshop, Photoshop, 7, photoshop 7, graphisme, graphic, infos, kits, kits graphiques, kit graphique, webdesign, webdesigns, designs, design, histoire, portfolio, creations, colas, malaise, colas malaise, graphicolas, GC, GraphiColas, Graphicolas, tutoriaux, tutos, tutorials, tutorial, tutoriel, tutoriels, news, comments, php, html, integration, decoupage, kits graphiques gratuits, bobcolas, BobColas, Bobcolas, liens, links, link, lien, images, image">
< meta name="keywords" content="photoshop, Photoshop, 7, photoshop 7, graphisme, graphic, infos, kits, kits graphiques, kit graphique,
webdesign, webdesigns, designs, design, histoire, portfolio, creations, colas, malaise, colas malaise, graphicolas, GC, GraphiColas,
Graphicolas, tutoriaux, tutos, tutorials, tutorial, tutoriel, tutoriels, news, comments, php, html, integration, decoupage, kits graphiques gratuits,
bobcolas, BobColas, Bobcolas, liens, links, link, lien, images, image">
< meta name="description" content="GraphiColas ( GC), tutoriaux pour Photoshop 7, CrÈations, Webdesigns et kits graphiques ? tÈlÈcharger gratuitement
histoire de Photoshop, tutoriaux sur le dÈcoupage de design ( intÈgration) en HTML; etc...">
< style type="text/css">
body {
text-decoration: none;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}

a:link {
text-decoration: none;
color: #333333;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}

a:hover {
text-decoration: underline;
color: #000000;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}

a:visited {
text-decoration: none;
color: #333333;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
< /style>
< /head>
< body>
< table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
< tr>
< td colspan="5"><img src="images/design_fleur_01.jpg" width="700" height="208"></td>
< /tr>
< tr>
< td colspan="5"><img src="images/design_fleur_02.jpg" width="70" height="38"><a href="portfolio/index.php"><img src="images/design_fleur_03.jpg" alt="Mon Portfolio" width="86" height="38" border="0"></a><img src="images/design_fleur_04.jpg" width="39" height="38"><a href="tutoriaux/index.php"><img src="images/design_fleur_05.jpg" alt="Les Tutoriaux" width="100" height="38" border="0"></a><a href="webdesign/index.php"><img src="images/design_fleur_06.jpg" alt="Webdesigns & Kits Graphiques" width="142" height="38" border="0"></a><a href="infos/index.php"><img src="images/design_fleur_07.jpg" alt="Mes Infos ( Contact)" width="85" height="38" border="0"></a><a href="toshop/index.php"><img src="images/design_fleur_08.jpg" alt="L´Histoire de Photoshop, les trucs et astuces... [ UnDeR cOnStRuCtIoN ]" width="96" height="38" border="0"></a><img src="images/design_fleur_09.jpg" width="82" height="38"></td>
< /tr>
< tr>
< td colspan="5"><img src="images/design_fleur_10.jpg" width="700" height="43"></td>
< /tr>
< tr>
< td width="28" height="184"><img src="images/design_fleur_11.jpg" width="28" height="184"></td>
< td width="368" valign="top"><iframe src="frames/frame_news.php" width="364" height="180" scrolling="auto" frameborder="0" align="middle" name="news"></iframe></td>
< td width="56"> < img src="images/design_fleur_13.jpg" width="33" height="184"><img src="images/design_fleur_14.jpg" width="23" height="184"></td>
< td width="200" valign="top"></td>
< td width="48"><img src="images/design_fleur_16.jpg" width="48" height="184"></td>
< /tr>
< tr>
< td colspan="5"><a href="frames/archives.php" target="news"><img src="images/design_fleur_17.jpg" width="396" height="60" border="0"></a><img src="images/design_fleur_180.jpg" width="304" height="60"></td>
< /tr>
< tr>
< td colspan="5"><img src="images/design_fleur_18.jpg" width="700" height="22"></td>
< /tr>
< tr>
< td colspan="5"><table width="100%" border="0" cellspacing="0" cellpadding="0">
< tr>
< td width="28"><img src="images/design_fleur_19.jpg" width="28" height="188"></td>
< td width="325" valign="top"><iframe src="frames/frame_link.php" width="320" height="183" scrolling="no" align="middle" frameborder="0"></iframe></td>
< td width="55"><img src="images/design_fleur_22.jpg" width="55" height="188"></td>
< td width="236" valign="top"><iframe src="frames/frame_thanks.php" width="231" height="181" align="middle" frameborder="0"></iframe></td>
< td width="56"><img src="images/design_fleur_24.jpg" width="56" height="188"></td>
< /tr>
< /table></td>
< /tr>
< tr>
< td valign="top" colspan="5"><img src="images/design_fleur_25.jpg" width="700" height="84"></td>
< /tr>
< tr>
< td valign="top" colspan="5"><table width="700" border="0" cellspacing="0" cellpadding="0">
< tr>
< td width="28"
background="images/design_fleur_26.jpg"> </td

< td width="626" valign="top"> < div align="right"></div>
< table width="624" height="100%" border="0" align="right" cellpadding="0" cellspacing="0">
< tr>
< td width="250" valign="top"><iframe src="frames/blog.php"></iframe></td>
< td width="374" valign="top"><form method="post" name="form1" action="<?php echo $editFormAction; ? >">
< table align="center">
< tr valign="baseline">
< td nowrap align="right"><font size="2">Nom/Pseudo:</font></td>
< td><font size="2">
< input type="text" name="name" value="" size="30">
< /font></td>
< /tr>
< tr valign="baseline">
< td nowrap align="right"><font size="2">Message :</font></td>
< td><font size="2">
< textarea name="text" cols="30" rows="4"></textarea>
< /font></td>
< /tr>
< tr valign="baseline">
< td nowrap align="right"> </td>
< td><font size="2">
< input type="submit" value="Hop ! ">
< /font></td>
< /tr>
< /table>
< font size="2">
< input type="hidden" name="MM_insert" value="form1">
< /font>
< /form>
< p> </p></td>
< /tr>
< /table>
< /td>
< td width="48" valign="top" background="images/design_fleur_200.jpg"><img src="images/design_fleur_28.jpg" width="48" height="143"></td>
< /tr>
< /table></td>
< /tr>
< tr>
< td valign="top" colspan="5"><img src="images/design_fleur_29.jpg" width="700" height="29"></td>
< /tr>
< /table>
< /body>
< /html>

bobcolas
bobcolas
Niveau 9
12 juillet 2003 à 10:15:02

la page frames/blog.php

< ?php require_once(´../Connections/conn_blog.php´); ? >
< ?php
mysql_select_db($database_conn_blog, $conn_blog);
$query_rsBlog = " SELECT * FROM blog ORDER BY blogID DESC";
$rsBlog = mysql_query($query_rsBlog, $conn_blog) or die(mysql_error());
$row_rsBlog = mysql_fetch_assoc($rsBlog);
$totalRows_rsBlog = mysql_num_rows($rsBlog);
? >
< html>
< head>
< style type="text/css">
body {
text-decoration: none;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}

a:link {
text-decoration: none;
color: #333333;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}

a:hover {
text-decoration: underline;
color: #000000;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}

a:visited {
text-decoration: none;
color: #333333;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
< /style>
< /head>

< body>
< ?php do { ? >
< table width="100%" border="0" cellspacing="0" cellpadding="0">
< tr>
< td><p><font size="2">De < strong><?php echo $row_rsBlog[´name´]; ? ></strong> >> < ?php echo $row_rsBlog[´text´]; ? ></font></p>
< p><font size="2"><br>
< /font></p>
< /td>
< /tr>
< /table>
< ?php } while ( $row_rsBlog = mysql_fetch_assoc($rsBlog)); ? >
< /body>
< /html>
< ?php
mysql_free_result($rsBlog);
? >

Blawk
Blawk
Niveau 10
12 juillet 2003 à 11:37:44

C´est trop compliqué...
J´y comprend rien...

Avant 4.1.0 > A partir de 4.1.0
$HTTP_GET_VARS > $_GET
$HTTP_POST_VARS > $_POST
$HTTP_POST_FILES > $_FILES
$HTTP_COOKIE_VARS > $_COOKIE
$HTTP_SESSION_VARS > $_SESSION
$HTTP_ENV_VARS > $_ENV
$HTTP_SERVER_VARS > $_SERVER

Super, non ?

Ensuite, pour ton do..while: l´intermrétateur fait le DO avant le WHILE dasn ça en va pas. Il faut faire un simple WHILE.

Pour un simple livre d´or, ton script c´est un beau merdier... J´y ai d´ailleur rien compris.

Tiens voici le script qui gère MON livre d´or:
http://perso.wanadoo.fr/pierre.z/ldo.txt

kenshiro1980
kenshiro1980
Niveau 7
12 juillet 2003 à 12:31:48

Hey Blawk . .. je me fait chier à comprendre pourquoi t´as écrit ça:

if ( !$start)
$start = 0;

:doute:

( et je demande ça parceque j´arrive pas à voir ce que ça fait réellement)

Blawk
Blawk
Niveau 10
12 juillet 2003 à 12:49:06

Si ´var´ n´est pas précisé dans l´URL, $start est undefined et ça fait des couilles.

kenshiro1980
kenshiro1980
Niveau 7
12 juillet 2003 à 13:00:19

ah je vois ce que tu veux dire . .. :sarcastic:
marrant les smileys

Spyke88
Spyke88
Niveau 10
12 juillet 2003 à 13:01:09

:honte:

kenshiro1980
kenshiro1980
Niveau 7
12 juillet 2003 à 13:03:13

:lol:

bobcolas
bobcolas
Niveau 9
12 juillet 2003 à 14:55:44

Ca me saoule le PHP ! :ouch:

je vais etudier ton truc Blawk, merci

@+

bobcolas
bobcolas
Niveau 9
12 juillet 2003 à 14:56:58

en fait j´ai tout fait avec DW, j´ai rien codé :rire2:

bobcolas
bobcolas
Niveau 9
12 juillet 2003 à 15:09:15

Blawk, ds PhpMyAdmin, c´est quoi le nom de ta base de données et tu peux m´envoyer les fichiers avec les codes de tes tables stp ? ou alors dis les moi.

colasmalaise@wanadoo.fr

C´est quoi ton adresse msn ?

merci bcp ; )

P.S.: Je omprend un peu ce que tu as fait... :)

Blawk
Blawk
Niveau 10
12 juillet 2003 à 15:29:59

Oups, sorry...

CREATE TABLE ldo (
id int(11) NOT NULL auto_increment,
name varchar(50) default NULL,
mail varchar(60) default NULL,
body text NOT NULL,
date date NOT NULL default ´0000-00-00´,
PRIMARY KEY ( id)
) TYPE=MyISAM;

Je te conseille de changer el type de ´date´ pour TIMESTAMP(16). C´est mieux si tu as plussieurs messages pas jour.

Voici une date au format TIMESTAMP(14)

20030712152334

AAAAMMJJHHMMSS

A: Année
M: Mois
J: Jour
H: heure
M: Minute
S: seconde

Et par exemple, tu veux faire un enregistrement avec une date en TIMESTAMP(14), et bien tu fais comme ça:

INSERT INTO ta_table ( date) VALUES ( NOW())

Pratique, non ?

PS: Tu as pris un script tout fait ? T´a pas honte ? :-d

bobcolas
bobcolas
Niveau 9
12 juillet 2003 à 16:18:19

ok merci, je l´appelle comment ma db ?

et c´est quoi les $req et $ans ?

merci
@+

Blawk
Blawk
Niveau 10
12 juillet 2003 à 16:43:35

Le nom de la base est dans la requète, c´est ´ldo´ ( pour Livre D´Or)

Dans mes script, $req est une chaine de caractère reprèsentant une requète MySQL et $ans est el résultat de mysql_query(). C´est une ( bonne) habitude que j´ai pris quand je fesais les tutos de phpdebutant.

bobcolas
bobcolas
Niveau 9
12 juillet 2003 à 18:51:14

Ok, c´est ce que j´ai fait...
Mais ca marche pas, je ne comprend pas ce que tu as mis dans les actions du formulaire, . index....... c´est la concatenation ?

merci
@+

Blawk
Blawk
Niveau 10
12 juillet 2003 à 20:06:40

Ah oui... J´avais oublié ça...

$index, c´est le nom de la page mère. Si par exemple je veux afficher mon site sur un autre design, la page en pourra pas s´appeler index.php elle aussi. Donc avant un script, je mets dans $index le nom de la page gabarit.

bobcolas
bobcolas
Niveau 9
12 juillet 2003 à 21:18:07

Ok, donc je dois inclure ce script dans la page index.php ? l´inclure ou insérer le code ? ( c´est pareil de toute facon!)

merci encore

Blawk
Blawk
Niveau 10
13 juillet 2003 à 12:34:33

Au tout début du script, il faut que tu mette

$index = ´la_page_du_livre_d_or.php´;

bobcolas
bobcolas
Niveau 9
13 juillet 2003 à 13:51:12

Ah ok, je comprend mieux ! ; ) merci

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