Reply to Re: echo name file?

Re: echo name file? new!
by Bobrinha, 12 years, 2 months ago
I'm using this code

include('conexao.php');
include('class.upload.php');

$handle = new upload($_FILES['my_field']);

if ($handle->uploaded) {
  $handle->file_new_name_body = 'slide';
  $handle->image_resize  = true;
  $handle->image_x = 666;
  $handle->image_y = 260;
  $handle->process('uploads');
  if ($handle->processed) {
    echo 'Slide cadastrado com sucesso...';
    $query = mysql_query (" INSERT INTO slide(imagem,titulo,texto,preco) VALUES ('".$handle->file_dst_pathname."','$titulo','$texto','$preco')");
    $handle->clean();
  } else {
    echo 'error : ' . $handle->error;
  }
} 

Name in DB insert is uploadsslide.jpg , uploadsslide_1.jpg etc...

Correct is insert em DB slide.jpg , slide_1.jpg etc

Help-me plizReply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important