Merci pour ta réponse. Mais je n'y arrive pas
On est bien d'accord :
On est bien d'accord :
Code PHP :
<?php require_once('Connections/membre.php'); ?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['pseudo'])) {
$loginUsername=$_POST['pseudo'];
$password=$_POST['passe'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "choixpays3.php";
$MM_redirectLoginFailed = "inscription.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_membre, $membre);
$LoginRS__query=sprintf("SELECT pseudo, motdepasse FROM membre WHERE pseudo='%s' AND motdepasse='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $membre) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
Il y a bien ma superglobale qui est présente ? (plus précisément là : )
Code PHP :
<?php
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;