"how to save a file name in the mysql database?" Code Answer

5

don't have the privilege to comment right now but shouldn't this be like this plus you don't have a semicolon at the end of your sql script

$sql = "insert into arquivos (email_vol, nomearq) values ('" . $email . "', '" 
 .$arq . "');";

and also this

if (file_exists("uploads/" . $arq)) {
  $a = 1;

  while (file_exists("uploads/". $a . ".". $arq)) {
    $a++;
  }

  $arq = $a.".".$arq;
}

with a full stop between your file number and name

By Roger Leblanc on April 1 2022

Answers related to “how to save a file name in the mysql database?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.