Posts by Programador • 737 points
3 posts
-
1
votes1
answer743
viewsA: Send file to website and pick up the file path
$caminhoArquivo = ""; $diretorio = $_POST['nome_diretorio']; if (file_exists($diretorio)&&is_dir($diretorio )) { // mova o upload para esse diretório caminhoArquivo =…
-
62
votes6
answers12507
viewsA: Why shouldn’t we use mysql_* functions?
We should no longer use mysql_* for the following reason: INSERT INTO usuarios SET nome='$nome'; The value is passed directly into the sql clause, this leaves the application vulnerable to sql…
-
5
votes3
answers34761
viewsA: Error: "You have an error in your SQL syntax"
You can also do as follows: $query = "INSERT INTO orcamento SET nome='$nome', quantidade='$quantidade' "; Do not place the code field if it is auto increment.