Questions tagged as 'php'

2
answers

Return two data with AJAX and JSON

I have a form that was valid through AJAX. I need ajax (from the file va_registro.php) to return me two data at the same time, so I'm using JSON. I can not get back my data. registro.php - > This is the Form <!--Formulario de regis...
asked by 05.05.2018 / 16:59
1
answer

Validation login with PHP / Postgresql PDO

I am working with a login form in html / PDO PHP. As my PDO knowledge is almost zero I have been advancing in what the logic indicates and with stackoverflow. I already made my connection and data capture and validated the information (I repeat...
asked by 04.05.2018 / 17:12
2
answers

ajax request sends POST data but is not received

I have this code that sends data from a form to an script external $(document).on("submit","#previewOc", function(e) { e.preventDefault(); $.ajax({ url: "assets/contentHtml/ocs/preview.php"...
asked by 18.04.2018 / 15:29
1
answer

Problems receiving xml by request ajax jquery [closed]

I am doing tests for an application. I want to make an ajax request with jquery to a php file and receive an xml structure from it. The request with Jquery I do so: $.post({ url: 'php/procesar_xml.php', dataType: 'xml',...
asked by 18.04.2018 / 11:58
1
answer

Error registering the data in a mySQL database with PHP

I'm new to PHP and mySQL. The problem is, that error appears when I want to enter data from a form to a database, I do not get syntax errors but here is the code, I hope you can help me. <?php $conexion = mysqli_connect("localhost", "root"...
asked by 22.05.2018 / 01:20
1
answer

how to put together two fixes in php and show the result in a graph

I have a question I am doing a php file with a swich case of different ways of representing graphs of some data but I have a problem with the linear graph my idea was to make two arrays one where the names are found and another where the d...
asked by 30.10.2018 / 23:02
1
answer

Why when we want to use strpos to search for a word in a string, we have to say that it is not false?

I had to find a way to find a word within a php string and I got it, but I do not understand very well why. For example, would not it be easier to put == true before! == false? and what do we get exactly that is not false? Here is an example of...
asked by 30.10.2018 / 16:30
1
answer

Problems with AJAX and JSON Fatal error: Uncaught Error: Call to undefined function jason_encode ()

veran I have a problem sending and receiving data by AJAX. I tried to make a user login using ajax but it did not work for me. The code I have is the following: HTML FORM AND AJAX FUNCTION: <!DOCTYPE html> <html lan...
asked by 21.04.2018 / 21:35
2
answers

Error php: Can not modify header information - headers already sent by

I have a form that sends an email to the email. I have the web page uploaded to hostinger and from one day to the next without touching anything this error gives me: I think the error is in the header, when trying to redirect the page to the ind...
asked by 11.04.2018 / 08:41
1
answer

how to rename an image when saving in a database

I want to save an image in the database but at the time of saving, if 2 have the same name one replaces the other, as I check that if there is one with that name, I will change the name to the other one. at the moment like this I have the cod...
asked by 11.04.2018 / 17:18