Questions tagged as 'php'

2
answers

How to get all the data from the same .json file in PHP?

I have the following .json file { "Filmes": [ { "Uuid": "", "ImdbId": "tt0023331", "Title": "Pesn o geroyakh", "Year": "1983", "Director": "Joris Ivens", "A...
asked by 23.10.2018 / 13:02
3
answers

Problem to update record with combobox?

I am updating a column of the database using <select> option but when executing the code it does not update the column. I'm using MySQL. Prueba1.php <html> <head></head> <body>...
asked by 12.06.2018 / 16:45
1
answer

How can I insert data into two or more tables at the same time?

I'm using $sql = "INSERT INTO factura (user_id, fecha) VALUES ($userid, '$date')"; $sql = "INSERT INTO boleto (sala, horario, asiento, user_id)" VALUES ('$sala', '$horario', '$asiento', $userid)"; mysqli_query ($conn, $sql);...
asked by 18.06.2018 / 17:54
1
answer

How can I move from one site to another while keeping login from the main site?

I will try to explain as clearly as possible. Esoy developing a system, which includes several apps within the site. The main site controls the user's authentication and shows the apps that the user can access after the LOGIN. User data is lo...
asked by 12.07.2018 / 23:53
2
answers

See if a checkbox was selected in PHP

I want to validate and execute PHP code depending on whether you click checkbox or not. In the form this this: <input type="checkbox" name="checkbox" value="marcado"> <input type="submit" name=""> And in PHP I have: if...
asked by 12.07.2018 / 22:44
3
answers

Add values of a two-dimensional array and throw your total PHP

There is a method (array_sum) in PHP that adds the values of a two-dimensional array without having to traverse the array, but in this case I need to traverse that array without using this method to display the values per array and its total ....
asked by 13.05.2018 / 06:47
1
answer

LOPD acceptance box in form and php

we have to include in the contact form the acceptance box of the privacy policy, that in html is simple with this code <input type="checkbox" name="aceptar_terminos" id="aceptar_terminos" value="aceptar_terminos" /> He leído y acepto la...
asked by 23.05.2018 / 14:00
2
answers

How do I check 2 mysql tables at the same time?

$sql = "SELECT * FROM 'zzzz_1_post' WHERE POST_autor=1; but I also want to get $sql = "SELECT * FROM 'zzzz_0_post' WHERE POST_autor=0; I'm doing it in a while, but I do not know how to combine the 2 tables at once. My tables: while($...
asked by 27.05.2018 / 03:22
1
answer

copy files to another folder with php

I have this function $srcfile='C:\xampp\htdocs\imagenes\*.*'; $dstfile='C:\xampp\htdocs\imagenes-copiadas\*.*'; mkdir(dirname($dstfile), 0777, true); copy($srcfile, $dstfile); when I run the php I need to copy all the files in the direct...
asked by 24.05.2018 / 14:09
2
answers

Placeholder in a select

I'm using placeholder in my input text type and they work perfect, just that I have a select , in which I want to put a placeholder where it says "select an option", but it does not appear, Does anyone know if I can ad...
asked by 26.10.2017 / 00:22