-2
Generates txt, but saves only the last entry of the database and in the precise case of all data.
$querymail = mysql_query("select mat,nome from usuario ");
while($data = mysql_fetch_array($querymail)) {
$log = str_pad($data[0], 10, "0", STR_PAD_LEFT);
$log1 = str_pad($data[1], 40, " ", STR_PAD_RIGHT);
$linhas = "log1$log2.";
}
mysql_*
, they are obsolete. 2) Search about the functionfwrite
. 3) One was missing$
in the variable$conexao
in the last row.– Woss
Possible duplicate of Write to txt file with PHP
– Daniel
It’s not duplicated, different situations.
– checktech
Do the indicated search, try to make a solution and if you get an error, go back and edit the question with the code and the error message. Use the question that Daniel indicated as study material as well. It has the solution you need, just analyze the code.
– Woss
I made the suggestion, but the problem persists...
– checktech