Questions tagged as 'php'

1
answer

Error uploading data to MySQL using PDO

Today I am trying to upload data from a registration form to my db using PDO, I get "Error" which is the return that I have established when sending data. <?php require_once('models/connection.php'); class Data extends Connection {...
asked by 13.01.2018 / 23:21
1
answer

Error uploading files using PHP

Whatever I do, I always get the error: //echo "Ha ocurrido un error. Inténtelo de nuevo..."; And yes, I have the Xampp on with the Apache and MySQL. HTML Code: <form action="<?php echo $_SERVER['PHP_SELF'];?>" enctype="multi...
asked by 12.01.2018 / 18:59
2
answers

angular server

Hi, I am practicing with angular creating a web together with PHP as Back in separate environments (servers), PHP in Apache offers an API, and for now angular in my PC that reads that API (with ng server ). up there well But now I want...
asked by 06.03.2018 / 18:17
1
answer

Problem JQuery get input value

I have the following code: //Validar usuario existente con ajax //Pedimos el valor del campo usuario para verificar si existe y enviarlo al controlador //revise en la base de datos que esta palabra no exista var usuarioExistente = fal...
asked by 08.05.2018 / 18:40
1
answer

000webhost with mysql error: Parse error: syntax error, unexpected 'if' (T_IF) in /storage/ssd2/509/5475509/public_html/webhost.php on line 5? [closed]

   Parse error: syntax error, unexpected 'if' (T_IF) in /storage/ssd2/509/5475509/public_html/webhost.php on line 5 <?php //conectar con el servidor $conectar=mysql_connect('databases.000webhost.com','id5475509_julian_forus','') if (...
asked by 10.05.2018 / 15:34
1
answer

Problem with php gallery

I am a beginner in PhP and I am doing an image gallery with PhP (to facilitate the construction of the div that contains the images and applies the styles). This is the code: <!DOCTYPE html> <html lang="en"> <head>...
asked by 09.05.2018 / 17:23
1
answer

How to make a Loading when calling a page with ajax?

Well it happens that I want to add a gif Loading and run every time I click on the link, after a certain time I load the page, the gif should be centered and add a kind of dark background to the whole body , I'm using codeigniter, please help me...
asked by 08.05.2018 / 17:02
1
answer

Execute MySQL queries to two tables at the same time and show results

I would like to show a query of two tables that are not related to each other. they practically contain the same fields id, name, surname, avatar, date Table "content" and table "copies", the table "copies" are actually copies of the table "cont...
asked by 11.05.2018 / 16:20
2
answers

Is it possible to prohibit access to PHP documents from URLS?

I have .php files that make includes of other files, and AJAX scripts that need to make requests to other .php documents. For example, Document X.php has an AJAX script that sends a request to a B.php document and brings some information. Obv...
asked by 12.05.2018 / 06:06
1
answer

Carry out two consultations in the same method in Laravel

In an application made with Laravel, I have the following methods: public function scopeGetCountAndSumCotizacionesByVendedor($query, $ano, $mes) { return $query->select('trabajada_por', DB::raw('COUNT("trabajada_por") as cant_ve...
asked by 06.01.2018 / 02:42