par
civodul88 » 05 déc. 2011, 20:01
merci pour la réponse
voila ce que ca donne car en attendant ben je me suis un peu depatouiller mais je n'arrive pas a faire relier le formulaire au propriaiyaire (le membres)
j'ai bien un start session qui control le membre par son nom mais sur la page en question si je me connect avec un autre pseudo je vois le formulaire de l'autre membre lol.
une idée?
<?php require_once('Connections/mysql.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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;
}
}
$maxRows_rssup = 10;
$pageNum_rssup = 0;
if (isset($_GET['pageNum_rssup'])) {
$pageNum_rssup = $_GET['pageNum_rssup'];
}
$startRow_rssup = $pageNum_rssup * $maxRows_rssup;
mysql_select_db($database_mysql, $mysql);
$query_rssup = "SELECT * FROM liens";
$query_limit_rssup = sprintf("%s LIMIT %d, %d", $query_rssup, $startRow_rssup, $maxRows_rssup);
$rssup = mysql_query($query_limit_rssup, $mysql) or die(mysql_error());
$row_rssup = mysql_fetch_assoc($rssup);
if (isset($_GET['totalRows_rssup'])) {
$totalRows_rssup = $_GET['totalRows_rssup'];
} else {
$all_rssup = mysql_query($query_rssup);
$totalRows_rssup = mysql_num_rows($all_rssup);
}
$totalPages_rssup = ceil($totalRows_rssup/$maxRows_rssup)-1;
//-----------------------------------------------------------------
// Bertrand, flashxpress.net - Supprimer plusieurs enregistrements
//-----------------------------------------------------------------
if (!empty($_POST['supprimer'])) {
foreach ($_POST['supprimer'] as $cle) {
$Requete = "DELETE FROM liens WHERE id = '$cle'";
$resRequete = mysql_query($Requete, $mysql) or die(mysql_error());
}
header("Location:deletemultiplerecords.php");
}
//require_once('Connections/mysql.php'); ?>
<?php //include ('config_users.php'); ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div align="center">
<form action="" method="post">
<table width="750" border="2" cellspacing="5" cellpadding="2" bordercolor= "#7C6B5A" >
<tr>
<td >id</td>
<td >Nom du proprietaire</td>
<td>Liens</td>
<td>Nom </td>
<td >Taille </td>
<td>Action</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_rssup['id']; ?></td>
<td><?php echo $row_rssup['user_name']; ?></td>
<td><?php echo $row_rssup['user_link']; ?></td>
<td><?php echo $row_rssup['file_name']; ?></td>
<td><?php echo $row_rssup['file_size']; ?></td>
<td><input name="supprimer[]" type="checkbox" id="supprimer[]" value="<?php echo $row_rssup['id']; ?>"></td>
</tr>
<?php } while ($row_rssup = mysql_fetch_assoc($rssup)); ?>
<tr><td colspan="6" align="right">Supprimer la séléction.=> <input name="Supprimer" type="submit"value="Supprimer"> </td> </tr>
</table>
</form>
</div>
</body>
<?php
mysql_free_result($rssup);
?>
merci pour la réponse ;)
voila ce que ca donne car en attendant ben je me suis un peu depatouiller mais je n'arrive pas a faire relier le formulaire au propriaiyaire (le membres)
j'ai bien un start session qui control le membre par son nom mais sur la page en question si je me connect avec un autre pseudo je vois le formulaire de l'autre membre lol.
une idée?
[php]<?php require_once('Connections/mysql.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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;
}
}
$maxRows_rssup = 10;
$pageNum_rssup = 0;
if (isset($_GET['pageNum_rssup'])) {
$pageNum_rssup = $_GET['pageNum_rssup'];
}
$startRow_rssup = $pageNum_rssup * $maxRows_rssup;
mysql_select_db($database_mysql, $mysql);
$query_rssup = "SELECT * FROM liens";
$query_limit_rssup = sprintf("%s LIMIT %d, %d", $query_rssup, $startRow_rssup, $maxRows_rssup);
$rssup = mysql_query($query_limit_rssup, $mysql) or die(mysql_error());
$row_rssup = mysql_fetch_assoc($rssup);
if (isset($_GET['totalRows_rssup'])) {
$totalRows_rssup = $_GET['totalRows_rssup'];
} else {
$all_rssup = mysql_query($query_rssup);
$totalRows_rssup = mysql_num_rows($all_rssup);
}
$totalPages_rssup = ceil($totalRows_rssup/$maxRows_rssup)-1;
//-----------------------------------------------------------------
// Bertrand, flashxpress.net - Supprimer plusieurs enregistrements
//-----------------------------------------------------------------
if (!empty($_POST['supprimer'])) {
foreach ($_POST['supprimer'] as $cle) {
$Requete = "DELETE FROM liens WHERE id = '$cle'";
$resRequete = mysql_query($Requete, $mysql) or die(mysql_error());
}
header("Location:deletemultiplerecords.php");
}
//require_once('Connections/mysql.php'); ?>
<?php //include ('config_users.php'); ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div align="center">
<form action="" method="post">
<table width="750" border="2" cellspacing="5" cellpadding="2" bordercolor= "#7C6B5A" >
<tr>
<td >id</td>
<td >Nom du proprietaire</td>
<td>Liens</td>
<td>Nom </td>
<td >Taille </td>
<td>Action</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_rssup['id']; ?></td>
<td><?php echo $row_rssup['user_name']; ?></td>
<td><?php echo $row_rssup['user_link']; ?></td>
<td><?php echo $row_rssup['file_name']; ?></td>
<td><?php echo $row_rssup['file_size']; ?></td>
<td><input name="supprimer[]" type="checkbox" id="supprimer[]" value="<?php echo $row_rssup['id']; ?>"></td>
</tr>
<?php } while ($row_rssup = mysql_fetch_assoc($rssup)); ?>
<tr><td colspan="6" align="right">Supprimer la séléction.=> <input name="Supprimer" type="submit"value="Supprimer"> </td> </tr>
</table>
</form>
</div>
</body>
<?php
mysql_free_result($rssup);
?>[/php]