Posts by graciomar • 177 points
10 posts
-
-1
votes1
answer41
viewsA: Remove div that contains a specific class in html with php
This PHP library allows you to modify HTML content: PHP Simple HTML DOM Parser
-
0
votes1
answer337
viewsA: List two mysql Pdo tables
Try using UNION, but remember that in UNION the columns of the query have to have the same amount. SELECT cliente_codigo, cliente_nome FROM cliente UNION SELECT funcionario_codigo, funcionario_nome…
-
1
votes1
answer497
viewsA: Database structure for poll system
In this case you need to set in the database (opcao_id, resposta_id, usuario_id) as a single index or deal with PHP at the time of insertion.…
-
1
votes5
answers446
viewsA: How can I capture a favicon from a site via PHP?
I suggest using the Simple Dom Library: Simple Html Dom Example: <?php include("simple_html_dom.php"); $html = file_get_html('/'); echo $html->find('link[rel="shortcut icon"]', 0)->href;…
-
0
votes4
answers2294
viewsA: How to return an error after sending a form?
Try to pass a get or create a session variable and within the answer file you test. It is good to also use the mysql_affected_rows which returns the number of records reached by the query. $update =…
-
1
votes1
answer41
viewsQ: SQL - Select all records with encoding errors
Make a select in the database bringing all records with coding errors: SELECT * FROM tabela WHERE titulo LIKE '%ÇÃ%' Does anyone know another more efficient way?…
-
2
votes2
answers6278
viewsA: How to make a form that accepts photo upload and save to database
I think it more advisable to save the image path in the bank, I would do so: <?php include_once 'conexao.php'; $nome = $_POST['NomeAluno']; $idade = $_POST['IdadeAluno']; $foto =…
-
2
votes4
answers205
viewsA: How do you round it up in PHP?
<?php echo ceil(1.1); // 2 echo ceil(4.3); // 5 echo ceil(9.999); // 10 echo ceil(-3.14); // -3 ?>
-
5
votes1
answer228
viewsA: POST - Slim PHP
The query is incorrect. The correct structure would be: $sql = "INSERT INTO category (nameCategory) VALUES ('$paramName');";
-
1
votes0
answers81
viewsQ: Jquery Cycle 2 - How to make a summary of Pagination?
How to summarize the pagination of cycle2 for the other items of the pagination will appear according to the needs of the user and also it fits in a certain container?…