Questions tagged as 'php'

1
answer

How to print a JSON string within an input with PHP?

I need to print a string JSON from PHP within value of a input , to then be able to recover it with JavaScript . <?php $array = array( "foo" => "bar", ); $json = json_encode($array); ?...
asked by 24.08.2017 / 21:34
1
answer

Driver laravel does not update

I have a problem when I try to update the information, when I press the btn to edit the information, I load a view with the text fields that get information from the table, but when I edit them and try to submit, the request errors, for example...
asked by 19.04.2017 / 10:15
1
answer

Select date and load the value automatically

What, what I try to imply is that I need the user to select a date and without clicking on the me button of the selected date, I have searched for events in JS but I am a bit lost, someone could advise me by please, thank you very much .. I s...
asked by 27.03.2017 / 21:28
1
answer

Ignore multiple conditions in PHP

I have the following doubt I have an if q if it is a process shows some things but if it is any other shows other things. To the naked eye like this: <?php if($proceso == 'Tp'){ echo "Todo esto que ve TP"; } else{ echo "Todas estas...
asked by 05.07.2017 / 23:14
1
answer

Protect config.ini file gives usare error for mysqli connection

Based on this question: link I found the following way to protect the config.ini file for a connection with mysqli: ;<?php ;die(); // For further security ;/* [database] driver=mysql host=localhost port=3306 schema=...
asked by 07.03.2017 / 13:39
1
answer

help syntaxError: unexpected token {in json at position 4

I do not know where the error is, but if you make the query well $.ajax({ url: base_url + 'cargar/carga', type : "POST", data: {id:id}, success: function(json,textStatus, jqXHR) { console.log(json...
asked by 24.10.2018 / 02:03
1
answer

Error passing object by session in php

I'm doing a login, and the type of user is a different object, that object in the code that it queries if it works well, use a var_dump to the session variable where I used it and it works well, epro when I sent it no longer works. Login.php...
asked by 19.12.2016 / 05:11
1
answer

How to execute 2 or more stored procedures with mysqli in php?

I have 2 procedures stored in the same file, the connection is made correctly because if I delete any of the 2 procedures, the other one shows information but if I leave both, only the first one is executed. I have the file conectar.php...
asked by 30.12.2016 / 19:58
1
answer

POST method to send form data with AJAX without JQUERY [duplicate]

Hi, I have a script in js that sends the form data from a page to the server and it works well with a Jquery function but I would like to be able to do it without the use of Jquery. script with jQuery (works) $("#contact-form").on("submit...
asked by 29.04.2018 / 13:09
5
answers

Order by not working - PHP

I have this table: I do this query to get sorted data and create a select : select id, nombre from usuarios_grupos ORDER BY 'nombre' ASC ... and this is the result, surprisingly does not order it . Before it worked...
asked by 11.01.2017 / 14:04