Questions tagged as 'php'

1
answer

PHP class upload

Greetings to all, I come again with a problem that I have with self-loading classes with spl_autoload. This is my Autoloader class: class Autoloader { static public function CargarClases($className) { $filename = "../classes/" ....
asked by 15.12.2016 / 14:24
1
answer

Shopping cart

Hello, I ask another question because I have other doubts, I do not know if it's okay. Well, I propose what I have to do first. An object-oriented shopping cart (POO) that has basic operations such as adding product to cart to the aldo of eac...
asked by 23.11.2016 / 14:31
1
answer

PHP explode () with spaces

I have the following code: $pal = "botella, frasco, recipiente, bandeja, plato, barril"; $pal = explode(",",$pal); My question is, if there is a space after each comma present, can you leave the explode as it is or should you place "," in...
asked by 04.12.2016 / 03:22
5
answers

PHP href with conditional

I need to create a code for image gallery with a conditional href link. I've tried it, but since it's a php file everything is entangled. //defino un directorio $pathA = "images/"; //creo un array $ArrayA=Array(); //abro función glo...
asked by 11.11.2016 / 20:00
3
answers

Warning: mysqli_stmt :: bind_param (): Number of elements in type definition string does not match number of bind variables in /pg2.php on line 318

I am writing an INSERT statement and I have an error that I can not solve in the following statement: $stmt->bind_param("$tipo_var", $insert_valores); It happens that the variable $ var_type is enclosed in commas, so that the types of ea...
asked by 14.11.2016 / 22:59
2
answers

Undefined in php query

I do not know why, but it shows me the data correctly in one query and in the other I get the data Undefined ! Showing the following error when going through the for console.log($scope.servicio): process    Notice : Tryin...
asked by 08.11.2016 / 20:48
1
answer

Geolocation in php

I'm trying to get my location by means of the api of google maps implemented in php and javascript but when trying to get it I get a warning , which is as follows:    getCurrentPosition () and watchPosition (...
asked by 10.11.2016 / 17:59
1
answer

How to do operations with table fields in mysql?

I have a form that sends data to a table in mysql called (regis) and it has the fields (Name, Address, Phone, Job_ID, Amount, Date_input, Advance), in my field (Job_id) goes the value of my option selected, since I put a field with several optio...
asked by 09.11.2016 / 05:18
2
answers

Foreach with two array

I have two arrays that come out of two select multiple that I want to combine to store them in mysql I am using a foreach to go through one of them but I would like to know if there is the option to go through both and store them, so far this...
asked by 28.12.2016 / 19:19
1
answer

Block access using login with ajax on the client and php on the server

I'm doing an app in Javascript and I need to block access to unlogged users, in PHP it's easy using $ _SESSION but with JS I can not find a way Thanks for the help     
asked by 27.12.2016 / 13:54