Posts by Rayann Nayran • 212 points
8 posts
-
1
votes1
answer62
viewsA: Prevent Google Event sending when pressed F5 and access via GET
You could add the script to the DOM only if a specific parameter is present in $_GET. <?php if (isset($_GET['varTeste'])): ?> <script>...</script> <?php endif ?> And then you…
-
0
votes2
answers868
viewsA: Execute() from PDO returns false
Check the value returned by $stmt->execute() if ($stmt->execute()) { header('Location: ../index.php'); } else { var_dump($stmt->error); die; }…
-
0
votes2
answers56
viewsA: Delay in loading some records
You can monitor your server resources with htop. To install: apt-get install htop To use: htop To close: Press F10.
-
1
votes1
answer296
viewsA: Save cakephp associations 3
I edited the patchEntity by passing the key associated that informs the associated model that will be saved: $entidade = $this->Entidades->patchEntity($entidade,…
-
1
votes1
answer659
viewsA: Problem with select Multiple in form
You must declare the select name as an array: <select multiple name="config[]"></select> To transform the received array into a string you can use the function implode().…
-
0
votes2
answers514
viewsA: Delete image from BD and Folder
Check to see if the file exists. if (is_file("../upload/".$dadosDeletar->foto)) {/*excluir imagem*/} Make sure that $dadosDeletar->foto returns the expected value and that you are passing the…
-
1
votes2
answers61
viewsA: Difficulty sending Image to Database
Hello, you should save the image on the server and in the database you save only the path from where the image was saved. For example: You save the file avatar.jpg in /var/www/html/upload/images In…
-
1
votes1
answer59
viewsA: Doubt JSON PHP
You can do it like this: while($row = mysqli_fetch_assoc($result)) { $emparray['minha_array']['carro'][] = $row['carro']; $emparray['minha_array']['imagem'][] = $row['imagem']; } echo…