Questions tagged as 'php'

2
answers

How to do a POST of a variable and receive it as an object in PHP using AJAX?

Practicing AJAX, the following question arose: When we want to do a POST towards PHP, we put in the attribute data of the AJAX object, the variable that we want its content to be sent. Then in the PHP file we must make a POST of sai...
asked by 07.08.2017 / 20:21
3
answers

How to search for 2 fields in PHP?

I am trying to perform a search for 2 fields, both are in the same table, I want to look for a data captured in the bd either by the name of the team that is what is captured or by the date when it was captured. For now I can only search for...
asked by 08.08.2017 / 19:10
2
answers

Warning: mysql_query () expects parameter 1 to be string, object given in

I need to show the data entered by a user in a modal, which has a data select and enter an amount, these data must be shown in a table after being saved in DB When saving them, the error I get is:    Warning: mysql_query () e...
asked by 09.08.2017 / 20:47
2
answers

upload a file in local laravel

I want to upload a file from a form in Laravel. Input::file('imagen')->move('/public/imagenes/asdf',$producto->id.Input::file('imagen')->getClientOriginalName()); I tried this but it does not work, I get this error:    Call to a...
asked by 09.08.2017 / 08:57
2
answers

Group results with current date

Example, I have a query mysql like this SELECT * FROM post WHERE fecha >= $time; where $time = current week I also have a array with the days, which are grouped $days = array('Lunes', 'Martes', 'Miercoles',...
asked by 26.06.2017 / 16:14
2
answers

Insert multiple rows with a different field and the others equal in php and mysqli

I'm trying to insert several rows in the same query Details: I have several fields in the table, and only one field would have to be different in each row, the other fields would be identical in each row. This is the code I have. but I do...
asked by 22.06.2017 / 01:36
3
answers

Pass an array from php to get

I have this array in php. $error = array(); $error["error"] ="Tamaño máximo superado" Before sending it I do this $error = serialize($error); $error = urldecode($error); header("Location: subidaarchivos.php?".$error); But when I get to...
asked by 18.05.2017 / 13:01
3
answers

Delete PHP blank space

By php I generate and save a txt file that contains the data captured from a textfield, but when reading it from an application that I am creating it turns out that it has a blank space of more. How can I save my txt with the info lines I want...
asked by 20.05.2017 / 19:36
1
answer

laravel calculus age

Help I need to calculate the age, I have the date of birth but I do not find the function, this is what I have <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12""> <div class="form-group"> <label for="fecha_nacim...
asked by 24.05.2017 / 02:45
2
answers

Show message when the database was not updated

I have a form that updates a record in a database. (Works correctly). The problem is that when the condition where is not met, it shows correct update, although it is not updated. How do I do it so that when it does not update, it tell...
asked by 21.06.2017 / 22:58