Bon voila mon probleme j'ia une erreur de syntax la voila :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2
et voila le code :
<?php require_once('../Connections/connection.php');
//initialize the session
session_start();
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
session_unregister('MM_Username');
session_unregister('MM_UserGroup');
$logoutGoTo = "../index.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
session_start();
$MM_authorizedUsers = "membre,admin";
$MM_donotCheckaccess = "false";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && false) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "../index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
//mysql_select_db($database_connection, $connection);
//$sql=("select pseudo from ep_membres Where mailmembre='$MM_Username'");
//$result=mysql_query($sql);
//$rs=mysql_fetch_array($result);
//$pseudo=$rs["pseudo"];
mysql_select_db($database_connection, $connection);
$query_Recordset2 = "SELECT ep_membres.pseudo, ep_messages.desti , ep_membres.mailmembre, ep_messages.idmessage, ep_messages.moisarriv FROM ep_membres, ep_messages WHERE ep_messages.desti = ep_membres.pseudo";
$Recordset2 = mysql_query($query_Recordset2, $connection) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
$datearriv=date("d/m/Y");
$heuresarriv= date("H:i");
$moisarriv=date("m");
mysql_select_db($database_connection, $connection);
$updateSQL="UPDATE ep_messages SET
lu='y',datearriv='$datearriv',heuresarriv='$heuresarriv',moisarriv='$moisarriv' WHERE idmessage=$idmessage";
$Result1 = mysql_query($updateSQL, $connection) or die(mysql_error());
$colname_Recordset3 = "1";
if (isset($_GET['idmessage'])) {
$colname_Recordset3 = (get_magic_quotes_gpc()) ? $_GET['idmessage'] : addslashes($_GET['idmessage']);
}
mysql_select_db($database_connection, $connection);
$query_Recordset3 = sprintf("SELECT * FROM ep_messages WHERE idmessage = %s", $colname_Recordset3);
$Recordset3 = mysql_query($query_Recordset3, $connection) or die(mysql_error());
$row_Recordset3 = mysql_fetch_assoc($Recordset3);
$totalRows_Recordset3 = mysql_num_rows($Recordset3);
?>
<html>
<head>
<title>Espace Membre</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body background="http://mondelendill.free.fr/fond.jpg" text="white" alink="red" vlink="red" link="red" >
<style type="text/css">
<!--
body { background: url('http://mondelendill.free.fr/fond.jpg') no-repeat fixed }
-->
</style>
<center>
<table border="0" width="800" cellpadding="0" cellspacing="0">
<tr>
<td width="800" colspan="3" align="center">
<img src="http://mondelendill.free.fr/banniere.jpg">
</td>
</tr>
<tr height=20>
</tr>
<tr>
<td width="100" valign="top" align="center">
<table align="center" border="1" width="100" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#666666">
<center>Le Serveur est</center>
</td>
</tr>
<tr>
<td align="center" bgcolor="#000000">
<script type="text/javascript" src="http://www.rpg-paradize.com/online.php?site=751"></script>
</td>
</tr>
<tr>
<td bgcolor="#666666">
<center>Menu</center>
</td>
</tr>
<tr>
<td align="center" bgcolor="#000000">
<a href="http://mondelendill.free.fr/index.php" style="text-DECORATION:none"><font onMouseOver="this.style.color='#ffffff'" onMouseOut="this.style.color='red'">News</font></a><br>
<a href="http://elendill.heavenforum.com" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='red'">Forum</font></a><br>
<a href="http://mondelendill.free.fr/telechargment.php" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='red'">Téléchargement</font></a><br>
<a href="http://mondelendill.free.fr/membres/tousmembres.php" style="text-DECORATION:none"><font onMouseOver="this.style.color='#ffffff'" onMouseOut="this.style.color='red'">Membres</font></a><br>
<a href="http://mondelendill.free.fr/ts.php" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='red'">Team Speak</font></a><br>
<a href="http://mondelendill.free.fr/tchat.php" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='red'">Tchat</font></a><br>
<a href="http://mondelendill.free.fr/radio.php" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='red'">Radio</font></a><br>
<a href="mailto:[email protected]" style="text-DECORATION:none"><font onMouseOver="this.style.color='#ffffff'" onMouseOut="this.style.color='red'">Contact</font></a><br>
<a href="http://mondelendill.free.fr/membres/index.php" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='green'" color="green">Compte</font></a><br>
<a href="#" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='green'" color="green">Joueur en ligne</font></a><br>
</td>
</tr>
<tr>
<td bgcolor="#666666">
<center>Guide</center>
</td>
</tr>
<tr>
<td align="center" bgcolor="#000000">
<a href="http://mondelendill.free.fr/installation.php" style="text-DECORATION:none"><font onMouseOver="this.style.color='#ffffff'" onMouseOut="this.style.color='red'">Installation</font></a><br>
<a href="http://mondelendill.free.fr/elendill.php" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='red'">Le Monde d'Elendill</font></a><br>
<a href="http://mondelendill.free.fr/commandes.php" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='red'">Commandes</font></a><br>
<a href="http://mondelendill.free.fr/raccourcis.php" style="text-DECORATION:none"><font onMouseOver="this.style.color='#ffffff'" onMouseOut="this.style.color='red'">Raccourcis</font></a><br>
<a href="http://mondelendill.free.fr/classe.php" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='red'">Classe/Skill</font></a><br>
<a href="http://mondelendill.free.fr/race.php" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='red'">Race</font></a><br>
<a href="http://mondelendill.free.fr/quetes.php" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='red'">Quêtes (Lvl 20/40/62)</font></a><br>
<a href="http://mondelendill.free.fr/maps.php" style="text-decoration:none"><font onmouseover="this.style.color='#ffffff'" onmouseout="this.style.color='red'">Maps</font></a><br>
</td>
</tr>
<tr>
<td bgcolor="#666666">
<center>Vote</center>
</td>
</tr>
<tr>
<td align="center" bgcolor="#000000">
<br>
<!-- Start of the topsite code -->
<a href="http://www.root-top.com/topsite/top20/in.php?ID=8"><img src="http://img91.imageshack.us/img91/4194/sanstitretruecolor02sp2.png" border="0"></a><br>
<!-- End of the topsite code -->
<br>
<!-- Start of the topsite code -->
<a href="http://www.root-top.com/topsite/krick/in.php?ID=241"><img src="http://grossistes-web.ifrance.com/lineage2.gif" border="0"></a><br>
<!-- End of the topsite code -->
<br>
<a href="http://www.rpg-paradize.com/index.php?page=vote&vote=751" target=_blank>
<img src="http://www.rpg-paradize.com/vote.gif" border=0>
</a>
</td>
</tr>
</table>
</td>
<td width="700" align="right" valign="top">
<table width="620" cellpadding="0" cellspacing="0" border="1">
<tr>
<td align="center">
<?php echo $aujourdhui = date("d-m-Y");d ?><br>
<a href="nouvmessages.php"><font onMouseOver="this.style.color='#ffffff'" onMouseOut="this.style.color='red'">Nouveaux Messages </font></a> -
<a href="messageslu.php"><font onMouseOver="this.style.color='#ffffff'" onMouseOut="this.style.color='red'">Messages déjà lus</font></a> -
<a href="messagesenvoyer.php"><font onMouseOver="this.style.color='#ffffff'" onMouseOut="this.style.color='red'">Messages envoyés</font></a> -
<a href="ecriremessage.php"><font onMouseOver="this.style.color='#ffffff'" onMouseOut="this.style.color='red'">Écrire un message </font></a> -
<a href="listemembre.php"><font onMouseOver="this.style.color='#ffffff'" onMouseOut="this.style.color='red'">Rechercher un membre</font></a> -
<a href="<?php echo "$email_serveur"; ?>"><font onMouseOver="this.style.color='#ffffff'" onMouseOut="this.style.color='red'">Écrire au webmaster</font></a><br><br>
Message de <?php echo $pseudo ?>
N° <?php echo $row_Recordset3['idmessage']; ?>
Envoyé le:<?php echo $row_Recordset3['datedepart']; ?> a <?php echo $row_Recordset3['heuresdepart']; ?>
<?php echo $row_Recordset3['sujet']; ?>
<?php echo $row_Recordset3['message']; ?>
<form name="form2" method="post" action="nouvmessages.php?suppmessage=ok&idmessage=<?php echo $row_Recordset2['idmessage']; ?>">
<input type="submit" name="Submit2" value="Supprimer">
<a href="nouvmessages.php">FERMER</a>
<form name="form1" method="post" action="repondre.php?idmessage=<?php echo $row_Recordset3['idmessage']; ?>&pseudo=<?php echo $pseudo; ?>">
<input type="submit" name="Submit" value="Répondre à <?php echo $pseudo; ?>">
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</body>
</html>
<?php
mysql_free_result($Recordset2);
mysql_free_result($Recordset3);
?>
Mais pas moyen de savoir ce qui cloche a la ligne 2 enfin voila merci d'avance
