Questions tagged as 'php'

1
answer

Run file safely

From my code in PHP I want to run another PHP file. For this I use this line: header('Location: proceso.php'); exit; How can I run this file in such a way that it is more secure and only executes from this line of code?     
asked by 22.06.2018 / 20:05
1
answer

Select inside where in laravel

The question is that I need to enter a% conditional where , according to the data that is sent to the controller, the question one of those conditions is that I bring the data according to a select , I already tried the query in the manage...
asked by 22.06.2018 / 19:21
2
answers

Upload an image to mysql with php without the need for a form

Good to everyone as they are ..! Well my question is: can you upload an image to MySQL without having to make a form? What I want to do is that I automatically upload the images that are in a folder to the database, because I'm really doing a...
asked by 27.08.2018 / 06:52
2
answers

Notice undefined index PHP error

I have a problem with my code, it turns out that when I give a value to my variable $ month, I get it all right, and I have since in the case that $ month has a null value or is empty, take me out the current month, and I get it right. The probl...
asked by 20.06.2018 / 16:16
1
answer

Why do not you save my mysql data via php?

html code <html> <head> <title></title> </head> <body> <form method="post" action="insertarp.php"> <b> Codigo Producto</b> <input type=text name="codigop" > <br><br> <b...
asked by 20.06.2018 / 17:33
1
answer

Send POST in php

I have a php file (crtEnfr.php) to which I sent a POST from another file (enfForm.php) to print a result in a table ... But I would like to send the same value of the POST that is in crtEnfr.php to another file (print_view.php) I know it h...
asked by 21.06.2018 / 08:49
1
answer

Validate modal window using $ this-validate in laravel?

Cordial greeting colleagues, I have a form in which I use two modal windows, one to create agents and another to edit them, in my controller I use $ this-> validate, to validate the fields of the form, the problem that I present is that when the...
asked by 21.06.2018 / 16:00
1
answer

Subtract 2 dates where one is saved as text

I wish to obtain the total sum of the days from the date of period 25-06-2018. My problem is that the period date can not be modified and added by a third part of a form and the format is: Tabla periodo id periodo1 id 1 d...
asked by 27.07.2018 / 19:39
1
answer

Intval () in php

I have a piece of code that is used in Datatables server side, and I do not know what this function is for, since it is inside the answer, but not in the library. $output = array( "draw" => intval($_POST["draw"]), "recordsTo...
asked by 28.07.2018 / 14:51
3
answers

How to pass values through AJAX of a Select using the ONCHANGE

I have this .php that sends the chosen value of a select <!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8" /> <title>pasar valores con ajax</title> // Aquí esta la referencia a jque...
asked by 19.06.2018 / 20:48