le 26/10/2009 à 19:40
Galerie PHP Mysql
merrrrccciiii
super dsl de n'avoir pas repondu plus tot je regarde ca demain.
je te tiens au jus
super dsl de n'avoir pas repondu plus tot je regarde ca demain.
je te tiens au jus
<?php require_once('Connections/photos.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;
}
}
mysql_select_db($database_photos, $photos);
$query_rs_chatons = "SELECT chemsoupetite FROM chemsou";
$rs_chatons = mysql_query($query_rs_chatons, $photos) or die(mysql_error());
$row_rs_chatons = mysql_fetch_assoc($rs_chatons);
$totalRows_rs_chatons = mysql_num_rows($rs_chatons);
$colname_rs_un_chatons = "-1";
if (isset($_GET['idchemsou'])) {
$colname_rs_un_chatons = $_GET['idchemsou'];
}
mysql_select_db($database_photos, $photos);
$query_rs_un_chatons = sprintf("SELECT * FROM chemsou WHERE idchemsou = %s", GetSQLValueString($colname_rs_un_chatons, "text"));
$rs_un_chatons = mysql_query($query_rs_un_chatons, $photos) or die(mysql_error());
$row_rs_un_chatons = mysql_fetch_assoc($rs_un_chatons);
$totalRows_rs_un_chatons = mysql_num_rows($rs_un_chatons);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<div>
<?php do { ?>
<a href="test01.php"><img src="images/chemsou/<?php echo $row_rs_chatons['chemsoupetite']; ?>" id="<?php echo $row_rs_un_chatons['idchemsou']; ?>"/></a>
<?php } while ($row_rs_chatons = mysql_fetch_assoc($rs_chatons)); ?>
</div>
<div>
<img src="images/chemsou/<?php echo $row_rs_un_chatons['chemsougrande']; ?>" />
</div>
</body>
</html>
<?php
mysql_free_result($rs_chatons);
mysql_free_result($rs_un_chatons);
?>