Questions tagged as 'php'

1
answer

Read php associative array

I am trying to read a csv file to assign my mysql fields to the fields that the csv brings and to be able to select them from a form with a select. At the moment I read the csv and I convert it into an associative array with this: $...
asked by 15.02.2018 / 21:37
2
answers

Convert dynamic element into clickeable

I have the following element in my project: Individual code for each box <div class="col-md-3 col-sm-6 col-xs-12"> <div class="info-box bg-aqua"> <span class="info-box-icon"><i class="fa fa...
asked by 18.02.2018 / 19:23
2
answers

How to avoid the foreign key constraint error in phpmyadmin and in php?

Very good! I am doing a small practice to remember after having been studying again the php and in knowledge of the MySqli (style procedure), when creating the database and the corresponding tables. I have never seen this error after making the...
asked by 02.06.2017 / 19:30
3
answers

How to interact with inputs type file?

When I have a form with an input of type file when sending it, in my receiving action as I can check if it is set or not as with if (isset($_POST['my_file'])){ echo "bla"; } does not work <form enctype="multipart/form-data...
asked by 02.01.2017 / 18:30
2
answers

Regular php expression between tags

I need to get this number 2769 inside these tags with a regular expression in php <td style="background-color:#b0c400;border-bottom:1px solid #ffffff;text-align:right;padding:0px 5px 0px 5px;color:#000000;">2769</td> I tried to...
asked by 26.10.2016 / 16:03
2
answers

Delete URL when reloading

I'm doing a login, everything went perfectly with PHP, only I have a problem. When a user is not found in the database, PHP returns the following: header("Location: ../index.php?error=userNotFound"); This parameter I capture with a GET as f...
asked by 05.08.2016 / 01:48
5
answers

Error parsing json javascript [duplicated]

I'm working with php, mysql and jquery. Where I create a json with php that brings a single data, and I'll find it with jquery ajax. If I make a console.log to my data variable brought with ajax it shows me the data like this: [{"folio": "4562...
asked by 11.10.2016 / 17:27
2
answers

calculate the age from the date of birth with the datepicker class [duplicated]

I would like to calculate the age of a user from his date of birth, so that when the date of birth is entered in: <input type="date" name="fecha_nacimiento" id="fecha_nacimiento" class="datepicker" /> and it automatically loads in t...
asked by 06.04.2017 / 22:09
1
answer

Position a logo on another image

I am having the user upload an image of a logo and then try to position it on another image that I have on the server. The position where the receipt will be superimposed as parameters by POST. The logo I receive is always a PNG, which may or...
asked by 17.05.2017 / 20:36
2
answers

Recover array generated in JSON and sent by POST

I create a array with JSON and send it in an encrypted variable in base64 in a form. I recover it by POST , the decrypted and it remains: [ {"idcliente":"1", "id_comercial":"999999", "preciototal":"698.01", "p...
asked by 27.06.2016 / 19:13