Questions tagged as 'php'

1
answer

Delete the first line of an array and store result (php)

I am looking for the correct way to open a text file to upload the content to a    array Delete the first line and save the content in the same text file again. without the deleted line I use this example: <?php $ra= file("datos.t...
asked by 29.09.2017 / 21:29
3
answers

Calculate distance between two points api google maps php

Having the points I need to calculate the distance between them to make a calculation of a price, how could I do it from php? Doing it from the frontend with the javascript api would be unsafe because they could inject a distance that is not cor...
asked by 16.11.2017 / 13:57
1
answer

Error in MYSQL and PHP query

Good afternoon. I do not know why this query is not done in PHP and Mysql This is the code of the form to send the content: <?php session_start(); if(!isset($_SESSION['usuario'])) { header('Location:auth'); exit(); } include 'conexion.ph...
asked by 15.11.2017 / 21:45
2
answers

Show image from the server folder and display it in a table with data from the MySQL database

I'm doing a project in which data is sent using a PHP form to a MariaDB database. I would like to suggest how to show the table with the data of the database as a report and show the image that was stored in the images folder. The scri...
asked by 16.08.2017 / 07:22
2
answers

Notice: Undefined index: id

I have a form with php and html , in which, I want to modify my Database. I'm just confused with this error message. Form <?php require('../admin/conexion.php'); $id=$_GET['id']; $query="SELECT empres...
asked by 05.09.2017 / 17:55
1
answer

Function export to Excel with PHP parameters

I want to adapt this function that I use to export the complete DB to Excel to a function that by passing a parameter (paq) I returned an excel with the matches of the DB. My HTML of the button. <button onclick="Export()" class="btn btn-...
asked by 27.07.2017 / 20:04
1
answer

Two applications on the same server and the connections to BD are crossed

I have two applications on a single server, APP1 and APP2, each one with its own database, from one moment to another I enter APP2 and I see the information of the APP1 Database, they have different app_key, I put a different driver cache, chang...
asked by 04.09.2017 / 16:29
1
answer

Doubt with xml and laravel

Good, I'm new to the framework, I have a question about an XML that I'm doing in a project that is laravel, the detail is that I'm doing it entirely with php but when I want to visualize what I've done, I can not . here I leave my code <...
asked by 25.08.2017 / 00:20
3
answers

Build query according to CheckBox selected PHP / MySQL

I am trying to make a query according to the checkboxes that have been selected but I can not think of the best way to do it, I would like them to help me to build the code. Here's an example of how I'm doing it and if I select the...
asked by 18.08.2017 / 18:33
1
answer

Use javascript within PHP

I need to enter a specific password, if it is correct to redirect me to another page. Do I have to add javascript code? <?php $password = "123456"; if ($_POST['password'] != $password) { ?> <h2>Logueate</h2> <form name=...
asked by 13.09.2018 / 10:21