Questions tagged as 'php'

3
answers

Store javascript result in a php variable

There is some way to make this code work: <script> function getBaseURL() { // obtenemos el hash var jash = window.location.hash; // lo imprimimos return jash; } </script> <?php $url1 = "<script>getBaseURL();</script&g...
asked by 14.11.2017 / 14:02
1
answer

error Undefined index in php

in php, I get this error    Notice: Undefined index: user in C: \ xampp \ htdocs \ exemplification \ consultusuario.php on line 4 first php <!-- consultarUsuario.php--> <?php include('functions.php'); $user=$_GET['user'];...
asked by 14.11.2017 / 15:25
2
answers

Extract content from a sentence in PHP

Good morning, I wanted to ask you how I can extract the content of a sentence in PHP. Example: Chandal de pepe por sólo 3,50€ I need to extract the price from pepe's tracksuit, the prices can sometimes contain up to 3 or 5 digits and...
asked by 02.02.2018 / 12:25
1
answer

how to get an array of a file (file_get_contens) PHP?

I have a file user.txt where I keep this data: Array ( [id_usuario] => 1 [0] => 1 [nombre_usuario] => superusuario [1] => superusuario [apellido_usuario] => Administrador [2] => Administrador [correo_usuario] => 131d2f...
asked by 28.01.2018 / 02:26
1
answer

Upload MySQL PHP server image - form / data

I have a form to upload the data of a cabin to a table called "cabins" and the images chosen through the input property "file" to the table "images". The problem I have is that I do not upload the images. What am I doing wrong? Screen ou...
asked by 07.12.2017 / 16:21
1
answer

separate array laravel

I receive data from a view in this way, is there a way to separate them and make it like the example below? array:6 [▼ "id_producto" => array:1 [▼ "insumo" => "7" ] "precio" => array:1 [▼...
asked by 01.12.2017 / 18:05
2
answers

Infinite loop in PHP

Hi, I've started to see the object-oriented programming in php and I'm doing an exercise in which I make an sql query in which I want to show all the news that I have but it generates an infinite loop of the first news that I have saved. I think...
asked by 09.11.2017 / 17:09
2
answers

fopen (): failed to open stream: permission denied in

Good morning. I'm doing a function in php to split a series of css files, located in an "x" directory, in other smaller files and when ordering execute the function I get the error "fopen (): failed to open stream: Permission denied in ... "....
asked by 02.11.2017 / 12:51
2
answers

How to order the id's of the elements of a table - JS

in my code I add elements to a table using javascript. function agregarAlumno(){ var rut_alumno = $('#rut_alumno').val(); var nombre_alumno = $('#nombre_alumno').val(); $('#example1 tbody').append('<tr id='+rut_alum...
asked by 28.08.2017 / 13:46
1
answer

Adapt text to container in image with PHP

I have an image that I want to write on with php (editing the image), the text varies, but the area in the image where I want to write does not, so if the text is short I want the size of the typography be bigger. Can this be done? If possible,...
asked by 29.08.2017 / 02:59