How to get an id and display inline contents from the database

this is what i type in my-app.js:

{
		path: '/driverlist/',
		url: 'driverlist.html',
		on: {
			pageInit: function (e, page) {
				app.request.post(
					"http://localhost/pmn/driverlist.php",
					{},
					function(data){
						var obj = JSON.parse(data);
						for(var i=0;i<obj.length;i++){
							$$('#driverlist').append('<li><a href="/driverdetail/'+obj[i]['id']+'">'+obj[i]['name']+'</a></li>');
						}
					}
					);
			}
		}
	}

In driverlist.html the name of each driver will appear. After clicking it will move to the driverdetail.html page, the name, date of birth, license, and type of car should appear, but it does not appear. Help me

This is what I have written with my logic:

{
		path: '/driverdetail/:dataid',
		url: 'driverdetail.html',
		on: {
			pageInit: function (e, page) {
				app.request.post(
					"http://localhost/pmn/driverdetail.php",
					{},
					function(data){
						var obj = JSON.parse(data);
						
						$$('#driverdetail').append('<li>'+obj['id']['name']+'</li>');
						$$('#driverdetail').append('<li>BOD '+obj['id']['bod']+'</li>');
						$$('#driverdetail').append('<li>License '+obj['id']['license']+'</li>');
						$$('#driverdetail').append('<li>Brand '+obj['id']['brand']+'</li>');
						$$('#driverdetail').append('<li>Kind '+obj['id']['kind']+'</li>');
					}
					);
			}
		}
	}

Поэтапно отследите выполнение кода и найдите первую “точку”, где код работает не так, как ожидается. Затем устраните проблему.