par
Invité » 07 déc. 2006, 22:44
Voila le code tout entier, il m'affiche que la variable qui est: $ErrorMessage2 = Pas d'image
<?php
include ("config.php");
if(isset($_POST['img'])) $img = $_POST['img'];
else $img = '';
if(isset($_POST['url_img'])) $url_img = $_POST['url_img'];
else $url_img = '';
$date = date("d/m/Y");
$LimitInf = '0';
$LimitSup = '1';
$connection = mysql_connect("$dbhost", "$dblogin", "$dbpassword") or die ($ErrorConnection);
$db = mysql_select_db($dbname, $connection) or die ($ErrorDBase);
$select = "SELECT * FROM $gallery_table WHERE date='$FormatDate' ORDER BY ID DESC limit $LimitInf,$LimitSup";
$result = mysql_query($select,$connection) or die ($ErrorSelect);
$total = mysql_num_rows($result);
if($total=="0")
{
echo $ErrorMessage2;
}
else
{
while ($data = mysql_fetch_array($result)) {
$img = $data['img'];
$url_img = $data['url_img'];
?>
<center>
<div>
<?
echo $url_du_site.'/Gallery/images/$img';
?>
<IMG onmouseover=pick(this) style="FILTER: alpha(opacity=100) gray()" onmouseout=unpick(this) src="<?php echo $url_img; ?>" width="120" height="120" border="0" class="imglink" alt="<? echo $img; ?>">
</center>
</div>
<div>Plus >>></div>
<?php
}
}
mysql_free_result ($result);
mysql_close ();
?>
</center>
Rappel que ce code est inclu au menu droit

Voila le code tout entier, il m'affiche que la variable qui est: $ErrorMessage2 = Pas d'image
[php]
<?php
include ("config.php");
if(isset($_POST['img'])) $img = $_POST['img'];
else $img = '';
if(isset($_POST['url_img'])) $url_img = $_POST['url_img'];
else $url_img = '';
$date = date("d/m/Y");
$LimitInf = '0';
$LimitSup = '1';
$connection = mysql_connect("$dbhost", "$dblogin", "$dbpassword") or die ($ErrorConnection);
$db = mysql_select_db($dbname, $connection) or die ($ErrorDBase);
$select = "SELECT * FROM $gallery_table WHERE date='$FormatDate' ORDER BY ID DESC limit $LimitInf,$LimitSup";
$result = mysql_query($select,$connection) or die ($ErrorSelect);
$total = mysql_num_rows($result);
if($total=="0")
{
echo $ErrorMessage2;
}
else
{
while ($data = mysql_fetch_array($result)) {
$img = $data['img'];
$url_img = $data['url_img'];
?>
<center>
<div>
<?
echo $url_du_site.'/Gallery/images/$img';
?>
<IMG onmouseover=pick(this) style="FILTER: alpha(opacity=100) gray()" onmouseout=unpick(this) src="<?php echo $url_img; ?>" width="120" height="120" border="0" class="imglink" alt="<? echo $img; ?>">
</center>
</div>
<div>Plus >>></div>
<?php
}
}
mysql_free_result ($result);
mysql_close ();
?>
</center>
[/php]
Rappel que ce code est inclu au menu droit :)