Questions tagged as 'php'

1
answer

Php and sql query

I have a problem with an sql query with php, I need to calculate the total of units sold by vendor, I am limiting the number of records to show because the database has hundreds of records, and I am just trying out the query. But when making...
asked by 19.07.2016 / 21:30
2
answers

How do I code a string in json with php?

hi all I need is to encode a string that is in json format in python is something like this: def queue(self, url, api_user, api_pass, api_version): args = urllib.urlencode({'cmd': 'api_queue_sms', 'username': api_user, 'password': api_p...
asked by 03.04.2017 / 15:47
1
answer

PHP call to class constant interpreting its name from the contents of a variable

I have this code: if (!empty($filters['status'])) { if ($filters['status'] == 'DRAFT') { $query .= " AND r.status = :status"; $paramValues[':status'] = Report::STATUS_DRAFT; $paramTypes[':status'] = \PDO::PARAM_STR;...
asked by 03.04.2017 / 11:53
2
answers

How can I clean the fields of my form?

I am using PHPMailer, when sending the data to the GMail email but after clicking "accept" in the alert verifying that the email was sent, my fields are still full of the information I sent, does anyone know how I can reset them? ? Thi...
asked by 16.05.2016 / 01:10
1
answer

call a controller inside a test in cakephp

I can not call a controller in a cakephp2 test, I want to call a controller but using App::import or App::uses will not let me, nor will I call the $this->testAction How could I call him? I have used it in the follo...
asked by 06.04.2016 / 03:22
1
answer

Start session with java

I'm doing a web page in jsp with netbeans and I need to validate that the user has logged in to show some pages that should be restricted I've done this before but with php in the following way session_start(); if (!isset($_SESSION['missael'])...
asked by 30.05.2016 / 16:13
1
answer

PHP connection with DBISAM

For several days I have tried to connect to a DBISAM database but I have not managed it, download and install odbc driver and I do excel tests and it works perfect but when I try PHP it gives me an error, this is the script I'm using: <?php...
asked by 04.04.2016 / 21:26
2
answers

Reservations Classrooms with different time slots

the server must be able to reserve a classroom for 30 minutes, 1 hour or 1 hour and a half. The database: describes users; 'id','int(11)','NO','PRI',NULL,'auto_increment' 'username','varchar(64)','NO','',NULL,'' 'email','varchar(64)','NO...
asked by 13.05.2016 / 19:52
1
answer

I can not read an array

I have the following code $xml = simplexml_load_string($xml_raw); foreach ($xml->$user-agent as $ua): print $ua->String; endforeach; And it does not do anything, but print this: Notice: Undefined variable: user in /var/www/html/u....
asked by 09.05.2016 / 14:15
2
answers

Search by date in PHP

Good morning, I have the following query that makes me a query by dates to SQL SERVER: $query="SELECT art_Clave, art_Costo, kar_Fecha, kar_Cantidad, kar_Origen, alma_Existencia FROM tArticuloKardex WHERE art_Clave='".$buscar."' AND...
asked by 24.05.2016 / 16:16