Mysql - Database

See all posts See thread Reply

Re: Mysql - Database new!
by colin, 17 years, 4 months ago
You can read some class variables after calling process(). The following ones can be used to get the filename details:
$foo->file_dst_name
$foo->file_dst_name_body
$foo->file_dst_name_ext
$foo->file_dst_path
$foo->file_dst_pathname
Reply
Re: Mysql - Database new!
by Rolan, 17 years, 4 months ago
My code is like this, but how to get the $imagem_nome that is the image name saved?

$x = mysql_query("INSERT INTO foto_galeria (id_galeria, foto, comentario) VALUES ('$id_galeria', '$imagem_nome', '$comentario')");
 
$handle->Process('./fotos_galeria/');
if ($handle->processed) {
  // everything was fine !
  echo ' file uploaded with success';
  echo round(filesize($handle->file_dst_pathname)/256)/4 . 'KB';
  echo '  link to the file just uploaded: file_dst_name';
}
Reply
Re: Mysql - Database new!
by colin, 17 years, 4 months ago
Mmmh, like this, no?

$handle->Process('./fotos_galeria/');
if ($handle->processed) {
  // everything was fine !
  echo ' file uploaded with success';
  echo round(filesize($handle->file_dst_pathname)/256)/4 . 'KB';
  echo '  link to the file just uploaded: file_dst_name';
  $x = mysql_query("INSERT INTO foto_galeria (id_galeria, foto, comentario) VALUES ('$id_galeria', '".$handle->file_dst_name."', '$comentario')");
}
Reply