Bonjour aide moi svp avec ce code
Topson1
Messages postés
14
Date d'inscription
Statut
Membre
Dernière intervention
-
jordane45 Messages postés 38486 Date d'inscription Statut Modérateur Dernière intervention -
jordane45 Messages postés 38486 Date d'inscription Statut Modérateur Dernière intervention -
mon site :http://tvhitpro.ga/login.php Nom:admin Mot passe: admin @ 123
Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/vol15_4/xtreemhost.com/xth_21675441/htdocs/login.php on line 6
Warning: mysql_query(): No such file or directory in /home/vol15_4/xtreemhost.com/xth_21675441/htdocs/login.php on line 6
Warning: mysql_query(): A link to the server could not be established in /home/vol15_4/xtreemhost.com/xth_21675441/htdocs/login.php on line 6
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/vol15_4/xtreemhost.com/xth_21675441/htdocs/login.php on line 7
Voir code sur l'image

Code login
<?php
include("include/conf.php");
if(isset($_POST['submit']))
{
$query = mysql_query("select * from admin_login where username='".$_POST['username']."' and password='".$_POST['password']."'");
while($check_row=mysql_fetch_array($query))
{
$_SESSION['admin_login_status']="1";
$_SESSION['admin_id']=$check_row['id'];
$_SESSION['admin_name']=$check_row['user_name'];
echo "<script language='javascript'>window.location='manage_banner.php';</script>";
die();
}
}
?>
<title>Welcome to Control Panel</title>
<link rel="stylesheet" href="css/admin.css" type="text/css" />
<form name="frmLogin" action="" method="post">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center" class="texttitle">
</td>
</tr>
</table>
<table align="center" width="25%" cellpadding="2" cellspacing="0" border="0" class="even_row_border">
<tr>
<td colspan="3" class="field_row" style="height:30px" align="center">Administrator login</td>
</tr>
<tr class="odd_row">
<td class="detaild">User Name</td>
<td>:</td>
<td class="detaild"><input type="text" name="username"></td>
</tr>
<tr class="odd_row">
<td class="detaild">Password</td>
<td>:</td>
<td class="detaild"><input type="password" name="password"></td>
</tr>
<tr class="odd_row">
<td colspan="3" align="center">
<input type="hidden" name="session_uniq_id" value="<?php echo $_SESSION['session_uniq_id']; ?>">
<input type="submit" name="submit" value="Login">
</td>
</tr>
</table>
</form>
</body>
</head>
Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/vol15_4/xtreemhost.com/xth_21675441/htdocs/login.php on line 6
Warning: mysql_query(): No such file or directory in /home/vol15_4/xtreemhost.com/xth_21675441/htdocs/login.php on line 6
Warning: mysql_query(): A link to the server could not be established in /home/vol15_4/xtreemhost.com/xth_21675441/htdocs/login.php on line 6
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/vol15_4/xtreemhost.com/xth_21675441/htdocs/login.php on line 7
Voir code sur l'image
Code login
<?php
include("include/conf.php");
if(isset($_POST['submit']))
{
$query = mysql_query("select * from admin_login where username='".$_POST['username']."' and password='".$_POST['password']."'");
while($check_row=mysql_fetch_array($query))
{
$_SESSION['admin_login_status']="1";
$_SESSION['admin_id']=$check_row['id'];
$_SESSION['admin_name']=$check_row['user_name'];
echo "<script language='javascript'>window.location='manage_banner.php';</script>";
die();
}
}
?>
<title>Welcome to Control Panel</title>
<link rel="stylesheet" href="css/admin.css" type="text/css" />
<form name="frmLogin" action="" method="post">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center" class="texttitle">
</td>
</tr>
</table>
<table align="center" width="25%" cellpadding="2" cellspacing="0" border="0" class="even_row_border">
<tr>
<td colspan="3" class="field_row" style="height:30px" align="center">Administrator login</td>
</tr>
<tr class="odd_row">
<td class="detaild">User Name</td>
<td>:</td>
<td class="detaild"><input type="text" name="username"></td>
</tr>
<tr class="odd_row">
<td class="detaild">Password</td>
<td>:</td>
<td class="detaild"><input type="password" name="password"></td>
</tr>
<tr class="odd_row">
<td colspan="3" align="center">
<input type="hidden" name="session_uniq_id" value="<?php echo $_SESSION['session_uniq_id']; ?>">
<input type="submit" name="submit" value="Login">
</td>
</tr>
</table>
</form>
</body>
</head>
A voir également:
- Bonjour aide moi svp avec ce code
- Code ascii - Guide
- Code puk bloqué - Guide
- Code activation windows 10 - Guide
- Comment déverrouiller un téléphone quand on a oublié le code - Guide
- Code blocks - Télécharger - Langages
3 réponses
Bonjour,
Vous aider à quoi ???
En attendant, lisez ceci :
https://www.commentcamarche.net/infos/25899-demander-de-l-aide-pour-vos-exercices-sur-ccm/
Vous aider à quoi ???
En attendant, lisez ceci :
https://www.commentcamarche.net/infos/25899-demander-de-l-aide-pour-vos-exercices-sur-ccm/
Bonjour,
La première erreur ( et qui pourrait vous facilité la vie) est une problème de dépréciation... Cela signifie que vous utilisé quelque chose de trop vieux...
Plutôt que d'utiliser Mysql_query, utilisé PDO c'est plus simple à utiliser et cela vous enlèvera quelque erreurs...
La première erreur ( et qui pourrait vous facilité la vie) est une problème de dépréciation... Cela signifie que vous utilisé quelque chose de trop vieux...
Plutôt que d'utiliser Mysql_query, utilisé PDO c'est plus simple à utiliser et cela vous enlèvera quelque erreurs...
Bonjour,
1 - Attention, l'extension mysql était obsolète en PHP 5.5.0, et a été supprimée en PHP 7.0.0.
https://www.commentcamarche.net/faq/43261-php-l-extension-mysql-est-obsolete#top
À la place, tu peux (<gras DOIS </gras> ) utiliser l'extension MySQLi ou l'extension PDO_MySQL
https://www.commentcamarche.net/faq/44117-connexion-a-une-base-avec-pdo-mysqli
Si tu choisis PDO, pense à activer la gestion des erreurs : https://forums.commentcamarche.net/forum/affich-37584941-php-pdo-gerer-les-erreurs
1 - Attention, l'extension mysql était obsolète en PHP 5.5.0, et a été supprimée en PHP 7.0.0.
https://www.commentcamarche.net/faq/43261-php-l-extension-mysql-est-obsolete#top
À la place, tu peux (<gras DOIS </gras> ) utiliser l'extension MySQLi ou l'extension PDO_MySQL
https://www.commentcamarche.net/faq/44117-connexion-a-une-base-avec-pdo-mysqli
Si tu choisis PDO, pense à activer la gestion des erreurs : https://forums.commentcamarche.net/forum/affich-37584941-php-pdo-gerer-les-erreurs