jquery - How to pass a variable from php to a modal -


initially, can seen in unsuccessful attempt: undefined index error when sending variable jquery php , unsuccessful attempt:passing jquery variable php within modal

i trying pass variable php, jquery , php.

basically generating images form database in php loop. when user selects image, want id of image passed modal can query database again (based on id) , more information.

is there way of doing other methods outlined in posts above. reason not return result.

the difference between send php variable value javascript popup window in same page , question want heading.. , variable can query database again. not using input values form