Questions tagged as 'php'

1
answer

File upload with PHP

I do not understand very well why an input type file in a form does not work for me. Can you help me find the error? Form : <input type="file" name="imagen" class="form-control"> Processed : <?php $codigo = $_POST["codig...
asked by 27.01.2017 / 10:06
1
answer

Concatenate numerical values in an array using a hyphen

<?php $tipo = $_POST["radatenua"]; if ($tipo > 0) { if ($tipo == 40) { $atenuantes = $_POST["atenuantes"]; foreach ($atenuantes as $at): $atenuante1 .= $at . "-"; endforeach; } elseif (...
asked by 10.02.2017 / 14:05
5
answers

Passing variables from a javascript to an html

Hi, I have the following jquery script: <script type="text/javascript"> $(document).ready(function(){ $("a").on("click", function() { var img = $(this).children('img').attr('src'); var p = $(this).child...
asked by 23.01.2018 / 11:12
3
answers

Fatal error in a PHP include

In php I have this folder 'architecture': (lo que esta en negritas son las carpetas y lo que no los archivos). NOTE: The shared folder NO is inside the Curriculum. Students Curriculum informacion_estudiantes.php Shared...
asked by 27.01.2017 / 14:24
5
answers

Treatment of a textarea - PHP

If I submit an opinion about a reservation and the textarea of opinion is empty, you should not allow the opinion to be sent. The problem is that although it is empty if it accepts the spaces as a " opinion ", because it does not recogn...
asked by 03.01.2018 / 22:47
3
answers

Problem with fetch (PDO :: FETCH_ASSOC)

I have a small login form, with the variables $ user and $ password that have the correct values, the problem is that it gives me    Fatal error: Call to a member function rowCount () on boolean that is, as if the array were empty and I h...
asked by 06.11.2016 / 17:31
2
answers

Show table in sql

How can I go through the users variable to show me the table: <?php require_once 'database.php'; $database_connection = database_connect(); $users = $database_connection->query('SELECT * FROM tabla')->fetchAll(); $title = 'Ho...
asked by 11.09.2016 / 10:05
3
answers

How to use single quotes when I have php text [duplicated]

Hello, it is possible for example when I write the following code: $content=' //incluir texto con comillas simples l'informatique por ejemplo '; Is it that I use single quotes and sometimes I add text from php and obviously it cuts me is...
asked by 16.09.2016 / 09:49
4
answers

Insert data in a table from php with PDO

I see many old tutorials that do not use PDOs. I'm trying to insert but, I have not. The code is this: <?php require_once 'database.php'; $database_connection = database_connect(); $title = 'Home'; $content = ' <h4>Title 1</h4>...
asked by 11.09.2016 / 19:48
3
answers

Error doing include Warning no such file or directory

This is the error:    Warning: include (/folder/file.php): failed to open stream: No such   file or directory in file.php on line 3 This is the code with which I get an error: <?php session_start(); ?> <!DOCTYPE html> <h...
asked by 11.11.2016 / 16:32