1
I have two pages where one is the .js
calling via ajax a PHP routine to validate a user: https://pastebin.com/37RQtjUY
Another page in PHP that is the call of this previous routine where I will validate the user by his login and password to refer it to the rest of the site: https://pastebin.com/SExFjj3V
On line 23 and 24 I make a insert
on a table of log, however, when I do this, I have the JSON return to the page that called that routine; on the page .js
this return of PHP comes right, only on line 23 we have a redirect to the index_adm.php
, but jQuery isn’t doing it.
When I comment on line 23 and 24 (i.e., the insert
on the table of log in https://pastebin.com/SExFjj3V) Redirecting works well. Only when I insist on doing this insert
is that it doesn’t work. I don’t understand why this.
You can post the file containing that line
– Marcelo Batista
in the element inspector, you can see difference in sponses with or without line, suddenly you are returning a true, a special character or even an error, if you manage to inspect element, go to network and perform the action, you will see the call a request and a sponse, try to analyze the differences....
– Michel Simões
Leave the INSERT uncommented and in the file . js comment the redirect, and put
console.log(response);
in theif
and see what appears on the console.– Sam
I’ll see and return
– edson ferrari
I hadn’t thought about it, when you talk about element inspectors, are you talking about what’s the extent of Chrome? I use Fiddler to see the requests, return, ajax, but I do not use all resources, for lack of knowledge
– edson ferrari
OK I used this and did not point out any error, I do not know how to post an image here, I made one of the Fiddler that I use
– edson ferrari
Could post here the shows the console?
– Sam
See I’m using Fiddler, here is the link of the image https://snag.gy/91wZ8t.jpg, I think it points to an error, but sincerity I’m not able to understand. I used snag, because I don’t know if it’s possible
– edson ferrari