Questions tagged as 'php'

2
answers

How to add an element with php

Good morning I wonder if you can create items like h1 , h2 , div or buttons in html from
asked by 17.04.2017 / 03:59
2
answers

How to execute several methods of a class in the same PHP line [duplicated]

Hi, I wanted to know what structure the class should have so that once instantiated, several methods can be executed in a single line, for example I saw in several CMS or projects this: $NombreClase = new NombreClase(); $NombreClase->crea...
asked by 02.08.2017 / 20:40
2
answers

Run php function on the onclick of a button

I need to run the content of a función of php In the event onclick of a button, is there any way to do this? <?php function accion() { echo "accion"; } ?> <input type="submit" name="" value="Buscar" id="b...
asked by 17.04.2017 / 02:18
3
answers

Run .sql file from php

I have to make a program in php that executes two files .sql, both will create a table within my database 'form of payments'. The .sql files I already have, I just have to do the program in php. This is the sql file: -- MySQL dump 10.13 Di...
asked by 03.07.2017 / 23:42
1
answer

Help with the following code, I do not know what the error could be [duplicated]

Form: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="css/style.css"> <title>Validacion de...
asked by 12.12.2018 / 23:04
3
answers

Differences between continue and break in PHP

What are the differences between putting break or putting continue in a loop? I know that break interrupts the loop, but continue I do not know exactly what it does. When is it necessary to use one or the other?...
asked by 08.06.2017 / 09:25
2
answers

From SQL query to Query in Codeigniter

I have the following query in SQL that works fine SELECT MONTH(NOW()) AS mes, SUM(importe) as monto FROM pago_cliente WHERE MONTH(fecha_del_deposito) = MONTH(NOW()) AND YEAR(fecha_del_deposito) = YEAR(NOW()) GROUP BY 1 And I try to t...
asked by 27.03.2018 / 21:16
2
answers

Replace text in PHP

I have a question, I have a sentence that I need to eliminate certain content, but respecting the whole sentence. For example, the idea is to eliminate the characters that come after the word por . $string = "Hace hoy un buen día para pa...
asked by 07.02.2018 / 13:20
2
answers

variable in mysqli_query

I have a question with mysqli_query() , How do I send variables to my query ? I have the following code But it marks me an error when executing it How can I send the parameters POST to my query ? <?php require ('...
asked by 09.03.2018 / 22:48
2
answers

Login from PHP form [closed]

I created a very simple login, this login will receive a password and user that is in a database, the problem is that when you want to enter resutla this error:    Parse error: syntax error, unexpected '$ query' (T_VARIABLE) in   /home/u31458...
asked by 04.06.2017 / 04:59