if(!isset($t) || $t==""){
$req = "SELECT * FROM comdir WHERE dinom='$x' ";$sel mysql_query($req);$res mysql_num_rows($sel);
if ($res>0){$t = mysql_result($sel,$res-1,"dides");}
}
$big=$x;unset($fic);
$nbi=-1;$myDir = opendir($big);
while($ific = readdir($myDir)){
if ($ific !="." && $ific !=".."){
$ct=strtoupper($ific);$ctl=explode(".",$ct);
$req = "SELECT * FROM types WHERE type='$ctl[1]' ";$sel mysql_query($req);$res mysql_num_rows($sel);
if ($res>0){
$nbi++;$fic[$nbi]=$ific;
}
}
}
closedir($myDir);
if ($nbi<0){echo"<script>window.close()</script>";}
if ($thsrt=="dsc"){rsort($fic);}else{sort($fic);}
$i=0;
while ($i<=$nbi){
$img=$big."/".$fic[$i];
$isize = GetImageSize("$img");
// taille réèlle
$l=$isize[0];$h=$isize[1];
$sizl[$i]=$l;$sizh[$i]=$h;
// taille thumbnail
if ($thsiz>=71){$thsiz=70;}
if ($l>$h){$lt=$thsiz;$ht=number_format($h*$thsiz/$l, 0, ',', '.');}
else{$ht=$thsiz;$lt=number_format($l*$thsiz/$h, 0, ',', '.');}
$sizlt[$i]=$lt;$sizht[$i]=$ht;
$i++;
}
if (!isset($step)){$step=20;}
if ($step==10){
$comt=htmlentities($comm,ENT_QUOTES);
if (!$ext){$req = "INSERT INTO comment SET comm='$comt',image='$image' ";}
if ($ext && $comt<>""){$req = "UPDATE comment SET comm='$comt' WHERE image='$image' ";}
if ($ext && $comt==""){$req = "DELETE FROM comment WHERE image='$image' ";}
$sel = mysql_query($req);
$step=20;
}
c un formulaire pour mettre des commentaires pour mon album photo, donc quand je click sur le bouton Update, rien ne se passe. donc je pense que dans le nouveau php ils ont du changer qqch dans la method post du formulaire, mais j'ai cherché sur php.net mais jai pas trouvé d'infos.
qqn pourrait m'aider svp?
cs_Pretender
Messages postés8Date d'inscriptionmercredi 11 septembre 2002StatutMembreDernière intervention19 décembre 2004 19 déc. 2004 à 23:17
nan ca marche tjrs pas, jai le même problème avec un autre script, c un scripte pour envoyer un mail il y a deux fichier. plus petits donc peut etre plus facile a expliquer
exposend.php (les variables $bimg, $l et $h sont donné dans le lien par la page qui fait appelle à exposen.php)
<link href="../style.css" rel="stylesheet" type="text/css">
<title>Send a picture</title>
<? echo"";
?>
<form vname="FormName" action="expomail.php" method="post" enctype="multipart/form-data" name="form">
Your friend's e-mail:
</form>
et expomail.php
<code>
<title>Picture sent</title>
<link href="../style.css" rel="stylesheet" type="text/css">
<?
$mymail = "noreply@site.com";
$ente = "From: $mymail";
$subj = "A picture from site.com";
global $email;
global $name;
global $bimg;
global $msg;
$message = "<html>Hello,
$name wanted to show you this picture.
Here is the message of your friend: $msg
See you soon on seck.lu</html>";
mail($email,$subj,$message,$ente);
echo"Picture sent to $email
Thank you
Back";
?>
désolé mais j'arrive vraimant pas a trouver l'erreur avec l'ancien php ca marchait impec