Questions tagged as 'php'

1
answer

How to modify and delete two tables at the same time?

Good afternoon, I need your help, I am trying to delete and modify two tables at the same time I append the code that I am using; I hope and you can help me since it is difficult for me to do it, I would appreciate it:) .... Functions.php &...
asked by 04.12.2017 / 19:04
1
answer

Optimize code to eliminate array value

I have this code: //empezamos con articulos $ConsArticulos = Consulta_Dinamica("Array","id,color","Articulos","(FIND_IN_SET ('".$_SESSION["Empresa_Id"]."', 'empresa')) AND (FIND_IN_SET ('".$_POST["ReasViejoColor"]."', 'color'))"); fore...
asked by 04.12.2017 / 20:28
1
answer

How to make a selection of countries with PHP?

Hello good afternoon I'm doing this code to select a country But the problem is that if you selected a country but it gives me the last one of the list how can I show the one I want function pais ($dato, $name, $select, $tipo){ //-- $m...
asked by 04.12.2017 / 19:59
1
answer

Fatal error: Call to a member function fetch () on a non-object

I am trying to extract the data from a given cabin (it must be a whole number: 1, 2, 3, ... n). Why do you tell me that you have not defined "images" in the Cabanas.php file? I have defined var_dump ($ data); so you can tell me what you get...
asked by 04.12.2017 / 20:45
1
answer

Warning: invalid argument supplied for foreach () in - PHP

Why the following errors? Notice: Undefined index: images in C: \ xampp \ htdocs \ daw \ Classes \ Cabanas.php on line 24    Warning: Invalid argument supplied for foreach () in C: \ xampp \ htdocs \ daw \ modify.php on line 39 Test Cod...
asked by 05.12.2017 / 11:25
1
answer

Error form php to real server

I have a problem, and that is when trying to make a form to add values, the form stays on the same page .php and ignores any if or else .. Messages.php - > form: <form action="mensajes.php"> <input type="text" name="alias...
asked by 22.11.2017 / 14:17
2
answers

Laravel - Assign a value in an option of a select!

Hello (I'm just learning), I need in the value to assign the value of the id. Example: <option value="{{$idcategoriacuenta}}">{{$categoria}}</option> The problem is in the array () I do not know how to send the value o...
asked by 20.11.2017 / 04:57
2
answers

Multidimensional associative array

I have the following code: $lugares=array("lug"=>array("colonia"=>"sanfernanado", "direccion"=>23)); My question is how can I access the results, for example try to access the index colonia and show me the corresponding resu...
asked by 17.11.2017 / 04:11
1
answer

Where should the data be validated, in the model or in the controller?

Initially we know that the validations from javascript must be obligatory, my doubt is in the driver or model. Normally I perform validations of laravel validation in the controller, taking into account that these validations perform the assi...
asked by 21.02.2018 / 21:24
4
answers

Folder permissions on ubuntu

Hi, I have an installation with ubuntu where I'm going to use apache as a web server. For this I have created a folder in / var / www / html / tests Where I created a series of files for example "index.php" The problem I have is that if...
asked by 17.11.2017 / 16:02