Questions tagged as 'php'

2
answers

autoload with extended classes, inheritance

I have the following autoload <?php spl_autoload_register('_autoload'); define('DS','/'); function _autoload( $class ) { $class = ROOT . str_replace("\",DS,$class) . '.php'; if(!file_exists($class)){ echo "Error...
asked by 29.10.2018 / 20:27
3
answers

How can I avoid reloading my form when I send it to php using ajax?

Hello, how can I avoid reloading the page, when I send a form to php using Ajax. $(document).ready(function(){ $('#btn_login_detalles').click(function(){ var error_nombre=''; var apellido='';...
asked by 28.10.2018 / 17:09
2
answers

How do I verify a php variable is empty? Null [duplicated]

This would be the code, I need to know how to verify if the variable is empty or not. (comments where I need the verification) <?php include("coneccion.php"); /*************** SQL ******************/ @$buscar=$_POST["buscar"]; if...
asked by 29.10.2018 / 23:34
1
answer

UNDIFINED INDEX PHP Notice: Undefined index: num_int in C: \ xampp \ htdocs \ ferre-max \ php \ register.php on line 14

HELLO I AM MAKING A SENDING FORM BUT THIS ERROR COMES OUT    Notice: Undefined index: num_int in   C: \ xampp \ htdocs \ ferre-max \ php \ register.php on line 14 THIS IS THE HTML CODE <form class=" needs-validation col-md-6" act...
asked by 01.11.2018 / 23:35
2
answers

I have 5 variables, I need to generate a SQL code

- Hi, it's my first posting, I hope you can understand me clearly. - I have 5 variables which are of the Bool type. True or False. I need to be able to generate a SQL statement depends on the states of the variables. I was able to gen...
asked by 19.10.2018 / 14:02
2
answers

How to confirm before deleting a record with PHP and AlertifyJS?

I have a question with the confirmation before deleting a record from my Database, for this I am using PHP and the AlertifyJS library, in my HTML structure I have a link through which I send by GET method the id of the person to delete, in this...
asked by 19.10.2018 / 19:58
1
answer

Meter data in Laravel framework

I have problems with Laravel framework. My problem is that for some reason, when I try to put data in a way, they are not sent and send a 404 "page not found" error. This is the code I have. web (In the routes folder): <?php Route...
asked by 20.10.2018 / 21:21
1
answer

Read a File and Divide it by PHP Pages

Good I have the code portion to read a file and show it $file = fopen("../assets/libros/el_libro_de_la_sabiduria/cap_01.htm", "r") or exit("Unable to open file!"); $getline = ''; while(!feof($file)) { $getline .= fgets($file). "<br /&g...
asked by 09.11.2018 / 18:08
3
answers

Error with query Select Option in database

The select does not work with a value that I want to appear from the database. I have doubts about my code, what I want to do is that the value of a record appears as a value first in the select. My code: <?php include ("../../conexi...
asked by 10.11.2018 / 04:40
1
answer

Find what there is to modify when reading in a txt file

I have a txt file that contains this:    How many times do you access the Internet?       More than once a day | 32       Once a day | 12       Once a week | 16       Once a month | 14       I do not agree | 15 And in the index.php:...
asked by 11.10.2018 / 17:00