Questions tagged as 'php'

1
answer

. replace with array

I'm trying to replace a text that I have in a textarea as something is selected in a select. The fact is that what I would need is for you to erase the old text to insert the new one, but of course you can not delete all the text just a serie...
asked by 14.09.2017 / 17:57
1
answer

I can not insert data into MYSQL if I use the action in HTML to go to page

The code I have is the following: <form method="post" action="ingre_acta_exi.php"> <table class="table bg-info" id="tabla"> <tr class="fila-fija"> <td><input type="number" name="IDE[]" id="IDE" value=""/&...
asked by 14.09.2017 / 13:09
1
answer

echo field column repeated [duplicated]

I'm doing an sql query with LEFT JOIN, the issue is that both tables have a column named Id and I need to print the ID of one of the tables, how do you do this ?. Thanks !!     
asked by 14.09.2017 / 18:25
1
answer

CodeIgniter - Array to String conversion error

I am creating a function to obtain interpreter data based on the interpreter ID. This is the function that I created: interprete_model.php Models public function interpreteID($id) { //consultar los datos $this->db-&g...
asked by 05.05.2017 / 13:32
1
answer

Error calculating sum with PHP and MySQL and then insert it into another table [closed]

This way I send the form with JS AJAX to PHP: $(document).ready(function() { formSubmit() }) function formSubmit(){ $('#formComi').submit(function(e){ e.preventDefault() var idusuario = $('#idusuario').val() var desde = $('#...
asked by 05.05.2017 / 04:28
1
answer

Login by session roles

Good afternoon, nights, I'm doing a login for session roles and with two it works perfectly, so like this: user.php <?php session_start(); if(isset($_SESSION["usuario"])){ if($_SESSION["privilegio"] == 0){ }else{ header(...
asked by 04.05.2017 / 19:20
1
answer

Run several prepared queries

I have a query in which in the while of that query I make another subquery but it does not bring anything. Could you see what's wrong with the code that does not bring anything? It does not actually go through the first while. function...
asked by 04.05.2017 / 06:13
2
answers

Function in PHP to replace words

I would like to see if you can help me with the following, I would like to know if it is possible to do a PHP function to replace some words. I am using str_replace as follows: $mensaje = "Hola!"; $mensaje = str_replace($mensaje, "Hola!...
asked by 05.05.2017 / 16:50
1
answer

Fill select with data from a table

I am trying to fill select with the data of a table called municipios , but I have not gotten it to work, the code is as follows: <!doctype html> <html lang="es"> <body> <select name="comboseleccion"> <...
asked by 05.05.2017 / 22:22
1
answer

What is the error in this sprintf ()?

$sql = sprintf("INSERT INTO users (firstname, lastname, email, phone, state, dob, rules, pepsico_news) VALUES (%s, %s, %s, %s, %s, %s, %u, %s)", $fname, $lname, $email, $phone, $state, $dob, $rules, $pepsico_news); You have an error in your SQ...
asked by 25.04.2017 / 16:22