Probléme avec un script php/mysql

moad_kall Messages postés 8 Date d'inscription mercredi 1 août 2007 Statut Membre Dernière intervention 24 août 2008 - 22 août 2007 à 20:37
moad_kall Messages postés 8 Date d'inscription mercredi 1 août 2007 Statut Membre Dernière intervention 24 août 2008 - 24 août 2007 à 12:21
[quote= "moad"]Bonjour, j'ai télécharger un scripte php nommé "tlAds est un script de gestion de bannières et bandeaux publicitaires" et je l'ai installé facilement mais lorsque et j'ai fais quelques coorrections en ce qui concerne les variables.
Mais mon probléme, que j'ai pas pu résoudre, c'est au moment de l'identification un message d'erreur se génére le voilà " Notice: Undefined index: tlAds_login in d:\tp\test\tlads\index.php on line 147 " .
Et merci d'avance de me répondre. :P

voici le code ds l'index.php l'ereur il est marqué en rouge:
<?php
include('./config.php');

$debut = getmicrotime();
$version = "1";
$copy = "2006-2007";
$page = "index";
$req = "0";

if(isset($_GET['p']) AND $_GET['p'] == 1)
{    $sql mysql_query("SELECT pass FROM ".$prefix_table."admin WHERE login '".myaddslashes($_POST['login'])."'") or die("Erreur SQL : ".mysql_error());
    $val = mysql_fetch_array($sql);
    $req++;
    mysql_close();

    if(md5($_POST['pass']) == $val['pass']) {
        $expire = 2*3600;
    setcookie($prefix_table."login", $_POST['login'], time()+$expire);
    header("Location: ./");
    }
    else {
    header("Location: ./");
    }
}
?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN'
          'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='fr'>
<head>
    <title>N.satelcom v<?php echo $version; ?></title>
        <meta http-equiv='Content-Type' content='application/xml.xhtml; charset=iso-8859-1' />
    <meta name='description' content="Gestionnaire de base de données par MOAD KALLIDA" />
    <meta name='language' content='fr-FR' />
    <meta name='format' content='application/xhtml+xml' />
    <meta name='creator' content='MOAD KALLIDA' />
    <meta name='rights' content='Tous droits réservés' />
        <meta name='robots' content='index, follow' />
<style type="text/css">
body
{
    text-align: center;
    background-color: #d3d0cb;
    color: #000000;
    font-family: Arial;
    font-size: 12px;
}      
#site
{
    background-color: #f4f3f1;
    width: 85%;
    margin: auto;
    border-color: black;
    border-style: solid;
    border-width: thin;
}
img
{
    border: 0px;
}
a
{
    text-decoration: none;
    color: #993333;
}
a:hover
{
    color: #CC6600;
    text-decoration: overline underline;
}
p:hover
{
    color: #6B0010;
}
.bold
{
    font-weight: bold;
}
.redb
{
    font-weight: bold;
    color: red;
}
.header
{
    text-align: center;
    background-color: #7aa0c7;
    background-repeat: no-repeat;
    height: 80px;
}
.title
{
    float: left;
    color: #5d42b8;
    font-size: 32px;
    padding: 20px 20px 20px 20px;
    text-decoration: underline;
}
.menuh
{
    padding-right: 10px;
    padding-left: 10px;
    padding-bottom: 5px;
    padding-top: 5px;
    border-top: solid thin black;
    border-bottom: solid thin black;
}
.middle
{
    text-align: center;
    margin: auto;
    width: 80%;
    padding: 10px 10px 10px 10px;
}
.property
{
    margin: auto;
    margin-top: 10px;
    margin-bottom: 10px;
    border: dotted 1px black;
    width: 50%;
    color: #B90000;
}
.propertitle
{
    font-weight: bold;
    font-size: 13px;
    text-decoration: underline;
    color: black;
}
.middletitle
{
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    text-decoration: underline;
    color: #7aa0c7;
}
</style>
</head>

    

N.satelcom v<?php echo $version; ?>

    

<?php   $result <gras>mysql_query("SELECT login,statut FROM ".$prefix_table."admin WHERE login '".myaddslashes($_COOKIE[$prefix_table.'login'])." '") or die("Erreur SQL : ".mysql_error());</gras>
    $val = mysql_fetch_array($result);
    $req++;
    
    if($val == '0')
    {
?>
    

    
/!\ Phase d'identification /!\

    

       

        <form method="post" action="./index.php?p=1">
        <!--Login :

        Password :

        -->
              ----

        Login:,
        ,
     
      ----

        Password:,
                 
       ,
     
      ----

        ,
        &nbsp;,
     
   

        </form>
/php

il y a la suite bienûr :

3 réponses

Yoteco Messages postés 111 Date d'inscription lundi 20 octobre 2003 Statut Membre Dernière intervention 5 novembre 2008
23 août 2007 à 09:40
Ben apparement la cookie $_COOKIE['tlAds_login'] n'existe pas... ou du moins à l'index tlAds_login

Ce qui est incompréhensible, c'est que le monde soit compréhensible. (Albert Einstein)
0
moad_kall Messages postés 8 Date d'inscription mercredi 1 août 2007 Statut Membre Dernière intervention 24 août 2008
24 août 2007 à 12:18
Bonjour, merci a votre réponse  mais  quelle est la  solution a ton avi qui permet de résoudre le prob,  parceque j'arrive  à le corriger et merci d'avance
0
moad_kall Messages postés 8 Date d'inscription mercredi 1 août 2007 Statut Membre Dernière intervention 24 août 2008
24 août 2007 à 12:21
Bonjour, merci a votre réponse  mais  quelle est la  solution a ton avi
qui permet de résoudre le prob,  parceque j'arrive pas  à le corriger et
merci d'avance
0
Rejoignez-nous