Questions tagged as 'php5'

1
answer

Generate report in txt with query in SQL Server from PHP

From the following function queryMonth I want to generate the results of the query in a TXT. queryMonth function: public function queryMonth($fecha1,$fecha2) { $res = array(); $rowres = ""; $stmt = sqlsrv_query( $this->conn,"with ct...
asked by 24.01.2018 / 00:14
0
answers

Can you combine common php files with php POO structure?

My code is as follows: conexionbd.php <?php $credenciales_bd; /**Comprueba si el archivo db.php.ini existe*/ if (file_exists("../config/config.php.ini")) { try{ /*Lee el archivo db.php.ini*/ $credenciales_bd= parse_ini_file...
asked by 21.12.2017 / 18:56
0
answers

How to edit and delete in One to Many relationships with eloquent in laravel 5.1?

I have a 3 tables which have the following relationships: Events Table: public function modalitys() { return $this->hasMany('Deportes\Models\Modality', 'events_id'); } Modality Table: public function disc...
asked by 29.10.2017 / 13:13
2
answers

Error Notice: Undefined index: in search php

I'm doing a search in PHP and I get Notice: Undefined index:str I do not know how to solve it because I already have it called from the form where I get the information. I leave the search code. <form method="get" action="i...
asked by 19.10.2017 / 09:17
0
answers

Error Insert Database with php

Good morning I'm trying to make an insert to a database from php. It does not give me any apparent failure but it is not able to insert new rows in the table. This is the code. data2.php if($_POST['add'] == 1) { echo "Add"; $sql = "...
asked by 28.08.2017 / 13:19
0
answers

Paginacion with only result

I am trying to integrate a page that I had previously done, in fact I have it in a similar project and it works perfectly, for some reason in this part it only shows me the number 1 (a single page) this is my paging code: <?php $numero_p...
asked by 26.06.2017 / 03:57
1
answer

save form before sending it

I hope you can help me please. I have a PHP document called registro.php At the beginning I have a php code to save verify if I'm already logged in, after that I have my HTML with 6 forms, each form represents a step, I show an example below:...
asked by 22.06.2017 / 21:40
0
answers

imagecreatefromjpeg does not show image in PHP

Hi, I have a .php page with the following code: <?php header('Content-Type: image/jpeg'); $im_orig=imagecreatefromjpeg("https://drupal-multisite-s3.s3-us-west-2.amazonaws.com/files/universo.1.jpg"); $im_dest=imagec...
asked by 16.05.2017 / 22:11
2
answers

where is the error in my query

in my general database I have 5 database information schema mysql performance schema phpadmin test wordpress the base I use is test, inside I have my table commenti that contains 3 fields which are nome varchar (15) va...
asked by 09.05.2017 / 01:56
1
answer

Error getting id in php

I have a web application and it has a registration and a login, I have two headers for one to show when the user has not logged in and another for when it is already logged. but when I try to take data from the array to put it in an input of typ...
asked by 29.04.2017 / 19:05