![]() ![]() LoginData.password = document.querySelector('#password'). ername = document.querySelector('#username').value I'm new in codeIgniter and I'm trying to do sign up form, and upload profile picture and store the image name on databaseso when I use formopenit store on database just fine but the file doesn't go to my directory, when I use formopenmultipart the image upload. LoginBtn.addEventListener('click', displayForm, false) LoginBtn.removeEventListener('click', loginForm, false) then((response) => handleLoginErrors(response))ĭocument.querySelector('#registerMessage').style.display = "none" Based on other getJSON calls in the code, it is intended that the second argument is/can be an array, and if jsondecode returns null, it is also returned directly, where a decoded array is expected. 07:29 UTC php at lornajane dot net I see the same thing using stock ubuntu PHP (PHP 5.5.3-1ubuntu2.1) - it is fine if I load the JSON extension before the HTTP one, either put the json one first in php.ini or if using the ubuntu extension manager thing set the http.ini priority to 50 before you use php5enmod on it. * Throw error response if something is wrong:Ĭonst handleLoginErrors = (response) => // Destroy the Login Credentials Hence as second argument is an array and no JSON, which then causes the type error in jsondecode. ![]() LoginWelcome = document.querySelector('.welcome') LoginInfo = document.querySelector('#loginInfo'), SubmitBtn = document.querySelector('#submit'), I agree with droopsnoot, you need to JSON-encoded the string.ĭocument.querySelector('.logout').style.display = "none" Ĭonst startBtn = document.querySelector('#startBtn') Ĭonst loginBtn = document.querySelector('#loginMessage') Ĭonst loginForm = document.querySelector('#loginForm') $data2 = file_get_contents('php://input') I’m working on a project on a local machine/localhost (xampp) and I can’t seem to get the values passed over to the next script with json_decode( file_get_contents( ‘php://input’ )) Existing code that is using jsonlasterror () for error handling may need changing to handle the EWARNING instead. Hello, I’m working on a project on a local machine/localhost (xampp) and I can’t seem to get the values passed over to the next script with jsondecode( filegetcontents( ‘php://input.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |