Questions tagged as 'php'

1
answer

Failed to connect to mailserver

See, once I was answered that "edo" now I have another problem, it happens that when I send it I get this error:    Warning: mail (): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.i...
asked by 17.09.2017 / 03:39
2
answers

How to call a MYSQL stored procedure from PHP?

I would like to know how to call a stored procedure of Mysql from PHP , I have tried it in several ways but of none I have given and I searched the Internet and neither. I tried it as a simple query like this: $cal = $_POST['calc...
asked by 02.01.2018 / 19:55
2
answers

Select a form created using a PHP array?

By array I create forms with php , each form has a input text which is hidden (hidden) , I want to show it by a button in each of those forms. Similar to the Facebook posts that you have to click on the "Comment" b...
asked by 21.06.2017 / 05:05
1
answer

Replace multiple strings in PHP

I want to replace the result of several variables by PHP, each variable has a different value, I would like it if one value gives me a result that is changed by another. $descarga1 > Esto me devuelve el valor > Mega.co.nz ó Dropbox.com $...
asked by 22.06.2017 / 01:29
1
answer

Problems with running phpmailer from ajax

I would like to tell you that I want to send a form by ajax and that this data is obtained to execute the PHPMailer function. The problem is that from the file send _mensaje.php I get the following errors:    Undefined in...
asked by 25.07.2017 / 14:04
2
answers

ajax problem sending data with formdata

I can not get the form to print the data in the "resp" div that I group in the variable "form_data", this is a test code I am doing to learn how to use formData better. <?php $mes = "marzo"; ?> <script> var tiempo = "llueve"; $(...
asked by 18.07.2017 / 15:59
1
answer

How could I add blank spaces to a string? [closed]

link What I try is to remove this parameter from the URL "/ Sports% 20-% 20Arte" and then make a selection in the BD $busqueda = str_replace('%20'," ",$busqueda); but until now I only keep this: Sports-Art and I want to achieve somethi...
asked by 06.07.2017 / 03:44
1
answer

Concantenation with + = returns 0 [closed]

When doing this cycle, it prints 0. Why is this? $ano = '<select>'; for($i=date("Y"); $i>=1900; $i--){ $ano += '<option value="'.$i.'">'.$i.'</option>'; } $ano +='</select>'; echo $ano;     
asked by 03.07.2017 / 19:26
2
answers

Datediff gives me a Boolean value when comparing two dates

I have a login.php in which a user is valid, and if it is the correct one, I open the session. The code is as follows: if (password_verify($pass,$resultado)) { session_start(); $_SESSION['nic...
asked by 09.07.2017 / 08:03
4
answers

Check all selected checkboxes

I want to validate that the user has to select all checkbox to insert something. I have validated that I select only one, but I can not get it all. My code php : while ($imprime = $resultado->fetch_assoc()) { $tabla .= '...
asked by 08.06.2017 / 19:38