Questions tagged as 'php'

2
answers

concatenate with null values in mysql

I have the following: |ap_pat|ap_mat|pri_nombre|seg_nom| |Jara |Rios |Luis |ivan | |lopez |NULL |Jorge |alf | Concatenating with CONCAT or CONCAT_WS gives me a space of more between each data if this NULL...
asked by 02.03.2017 / 19:21
1
answer

Operation of -real_escape_string

I have a login, that when I enter a username and password in a form and press "enter" and I have established the connection to the database, use the following line of code: $pass = $mysqli->real_escape_string($_POST['txtpass']); I am inf...
asked by 29.03.2018 / 13:28
2
answers

How to verify if value exists using Jquery and if so, avoid sending the record?

I got some JQuery codes to verify if any value ( cedula in this case) exists in the database. The system works well, it shows when the card value exists or not, I would like now to prevent the form from being sent, because although it says t...
asked by 25.01.2017 / 23:55
1
answer

foreach with php and poo

I'm learning PHP with POO and I wanted to print an array with foreach with an object and it worked for me: class padre { function __construct() { $nombres = ["Perengano", "sutano", "chilindrina"]; foreach ($nombres as...
asked by 28.03.2018 / 07:13
2
answers

Refresh Without Reload Page

I am using DataTable which I have put some buttons that are not own DataTable but buttons of BootStrap. The question is: How to reload / update that table or delete that row from the table when I press the delete button without having to use a w...
asked by 04.01.2017 / 16:14
1
answer

PHP - echo with content that has double quote and single quote

What is the correct way to do the following echo in PHP echo '<img class="imgfit img" src="img/evento/3-thumb.jpg" onclick="window.location.href="img/evento/3.jpg"" style="border-radius:0;" alt="">'; The dilemma I have is that when us...
asked by 29.07.2016 / 22:49
2
answers

Message from mysql_fetch_array () expects parameter 1

I was trying to load content into an HTML table with the data I have in the database, but I find this "small" error. I have been visualizing different sites and as I did not find a quick and functional solution I come to you. This is my PHP c...
asked by 25.07.2016 / 07:09
2
answers

Save value of drop-down select in php

I have a problem with a select (type combo or dropdown), there I load with php a series of categories, the issue is that by an error of armed of the original base since the categories can not be more than 20/30 , they are always called by their...
asked by 20.10.2016 / 16:50
3
answers

Calculate value in PHP

I have this code with which I need to upload an image of a specific color according to the value obtained from the database. Example: > = 11 green img, > = 4 &
asked by 22.08.2016 / 23:49
4
answers

Use ($ _POST) in certain MODAL with Bootstrap

Hello everyone, I have 2 manners in my index. I have the registration modal (registration form) and the login modal (login form). How do I get my php to know which modal comes my ($ _POST)? Since at the beginning of my index I have this. <?...
asked by 12.10.2016 / 18:01