I am building a open blog website which users can create posts. Whenever a user creates post, it is being inserted to database and fetching its heading from database in the main page. Whenever a visitor clicks the heading of some post, it goes to a URL like
example.com?subject=places_to_visit_in_new_york
Also, today I generated a sitemap and it doesn't include those posts because they are not real pages and they are being called via a PHP function. I just sent my sitemap to Google and so far Google isn't indexing posts. (Which I understand.)
I checked other forums and their URLs are like
example.com/places_to_visit_in_new_york
Should my page be creating a new file for each post or can I keep going using a parameter for SEO?
If you tell me I can keep going this way, how can I understand if Google indexes posts? If a new file must be created for each post,can you tell me how to do it?