Questions tagged as 'php'

1
answer

Array foreach and MYSQL query with php

I have this example of foreach with array, and what I need to know is how can I enter mysql query to this array? <?php $cabecera=array("nombre","telefono","referencia"); $luis=array("Luis García","645395715","Trabajo"); $paco...
asked by 23.02.2017 / 01:18
1
answer

Activate PDO_OBDC drivers for PHP?

Sincerely since I do not touch php. Now at the University we will work with Arduino boards and we want to make a mini server with a web page hosted on it. Well, as things are going to be simple, I have decided to use Access ... I've been doin...
asked by 21.02.2017 / 21:55
2
answers

Pass and receive variable values in PHP in Wordpress

Cordial greeting. I'm new to this programming and I'm doing a page in wordpress that performs a query in SQL Server and sends the data to a table. By clicking on the "Consult" button, the page is redirected to a 404 because it does not proces...
asked by 21.02.2017 / 02:07
1
answer

codeigniter queries

I have an error in queries with codeigniter, I do not know how to eliminate those inverted quotes that are generated when passing the variable $ id2, and I do not recognize the variable $ id2 as a number. function Consulta_iClientesall($id2)...
asked by 12.06.2017 / 16:45
1
answer

Text custom plugin path change

function deals_bh_visits() { $fichero = "visits_deals.txt"; $fptr = fopen($fichero,"r"); $num = fread($fptr,filesize($fichero)); $num++; $fptr = fopen($fichero,"w+"); fwrite($fptr,$num); fclose($fptr); return ("<span id='days_sinc...
asked by 20.02.2017 / 06:25
1
answer

center text in php image

I am trying to align to the center the description of some products that I bring from a database, which is then printed on a ticket. The chain that I bring is variable, it can have from 10 to 200 characters, for which I must save the data in a c...
asked by 20.02.2017 / 15:54
1
answer

Syntax error when putting a number as mysql table name

Hello, I'm doing the following query with the variable $fechaActual = date('dmy'); dasd $mysqli->query("CREATE TABLE ".$fechaActual." (id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY)") This gives me syntax error but if I do this: $...
asked by 25.02.2017 / 05:44
1
answer

Separate elements of a vector according to its type

I need to separate the elements of a array according to whether it is number , text and alphanumeric but the alphanumerics are not printed: ( <?php $d[0] = 13; $d[1] = 133; $d[2] = 45; $d[3] = "Hice 89 lagartijas"; $d[4] = 778; $...
asked by 25.02.2017 / 04:24
1
answer

PHP - "Strict Standards: Only variables should be passed by reference"

I have the next PHP class <?php class __lovie{ private $ms; private static $i; private $llave; private function setKey(){ $this->llave = '#$/($='; } public function __construct(){ try {...
asked by 21.03.2017 / 03:16
1
answer

Json + PHP - Show text if the value is true

<?php $ch = curl_init("https://crackwatch.com/api.php"); // add your url which contains json file curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $content = curl_exec($ch); curl_close($ch); $json = json_decode($content, true); //print_R($json);...
asked by 05.02.2017 / 20:03