Questions tagged as 'php'

2
answers

php dom replace html tags

Hello friends, I would like to know how to replace some html tags, replace div tags that do not have class or style per tag p I have this code: <div> Lorem ipsum dolor sit amet <div> L...
asked by 24.02.2017 / 01:29
1
answer

Mix random names and surnames in php

I have 3 arrays: $nombres = array("Pepe", "Carlos", "Jesús", "Lola", "Rosa", "Maria"); $apellidos1 = array("Martin", "Lopez", "Salas", "Mateo", "Abas", "De Diego"); $apellidos2 = array("Quesada", "Alcala", "Marín", "Suarez", "Cobos","Rios");...
asked by 23.02.2017 / 22:14
1
answer

Codeigniter 3 password_hash

I'm doing a project with CodeIgniter and I need to encrypt the password. Controller methods: Login.php: public function index() { $this->form_validation->set_rules('usuario', 'Usuario', 'trim|required|xss_clean'); $this...
asked by 24.02.2017 / 02:42
1
answer

Access the DOM to an AJAX response

Good I need to be able to access from the DOM to a button painted with PHP, which is called from an AJAX. Since I read that the DOM would do it to the AJAX and then it gives you undefined , I can not do it the normal way. The specific butt...
asked by 26.11.2017 / 20:08
1
answer

PHP - Error message log in form

I want the log to say an error message "below" the password input of the style "Your data is not correct". How could I fill in the information of the div id="message" from the file logueo_administrator.php? File php where I made the conne...
asked by 27.11.2017 / 16:44
1
answer

Warning: Illegal string offset "Error bringing the results of a query"

Good afternoon, I have the following menu: I would like to click on each category to show only the products of that category, but not to show me the products shows me those errors, the code is the following for the logic: <?php i...
asked by 18.04.2017 / 18:07
2
answers

Header ("Location") in php does not work [closed]

I have a php code at the beginning of a document, but the header function does not work. My code is as follows: <?php $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); function lang() { $lang = substr($_SERVER['HTTP_ACCEPT_LANGUA...
asked by 18.04.2017 / 16:33
3
answers

How can I change my url in php with .htaccess?

What is normally done (I use laravel but I want to have the route system with the Php common):    www.mipagina.com/index.php?pagina=contacto As I need it:    www.mipagina.com/contacto /     
asked by 25.01.2017 / 19:59
2
answers

Send mail with phpmailer

I have the following code in phpmailer but when sending the mail, it sends me the following error "Call to undefined method PHPMailer::body()" the version of phpmailer that I use is 5.2.4 <?php require_once('phpmailer/class.phpmail...
asked by 17.04.2017 / 15:39
1
answer

send checkbox values as fix by ajax [duplicated]

hello I have the following problem .. I need to send the values of a group of checkbox in an array, through ajax and process them in php with codeigniter. I am starting with ajax so I do not know much about the matter, its contribution would b...
asked by 25.01.2017 / 21:44