Skip to content
Advertisement

How can I get ” last inserted id to database ” in Jquery Method?

hi guys my english is a little weak . Thank you from now for help

How can I return data1 from islem.php into server.js

echo should contain ‘ok’ and $lastid

How can I get ” last inserted id to database ” in Jquery Method?

jquery codes server.js

JavaScript

Php code islem.php

JavaScript

Advertisement

Answer

In islem.php you can return the complete information as a json object:

JavaScript

And in server.js you can use the info returned by the AJAX call like this:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement