Automated creation of new webpages | Sololearn: Learn to code for FREE!

+3

Automated creation of new webpages

How would I set up a website that creates a new webpage based on form information, similiar to posting an ad on craigslist, or a new post on reddit? I am struggling to find information on it on google, is there any specific terms to use?

7/10/2018 1:16:01 AM

Robby Wade

6 Answers

New Answer

+3

Corresponding to my previous reply, here it is. https://code.sololearn.com/Wh8Ltu24DJum/?ref=app

+11

I don't think that you would be creating a new webpage by posting a new post, at least that's not the correct term. You would be merely pushing/adding new elements to the page. For a functional forum, you'd need a database which your site can query. For each record returned by the query statement, you create an element to display said contents on your page. For page elements to be created dynamically, you will at least need JavaScript. I can try creating a mock version of a post-and-display page.

+8

HTML and JavaScript alone cannot perform add webpage features. You need server script and database to achieve that.

+3

I'm also curious about this. I tried looking into it a while ago and came up with a few things that somewhat work. So yeah, I don't know but it might be worth researching these. You can use an XML request to open another file with all the formatting then dump it into .innerHTML or somehow parse it. Likewise, you could run a JS script to write all the formatting. Somehow this seems dodgey, though. Or you can use a server-side language to build the webpage, like php or node.js. Someone told me there is a php command called 'include' that works.

+2

Thank you all, I was just able to find some information on it as well, I am going to start learning php soon then.

+1

this can be done by a CMS (content management system). it automatically generates new elements to a page or new pages to a site. in other words, the CMS generates the html/css structure and passes on the data to the database. most CMS also handle login of users and creation of accounts. some php CMS: wordpress, kirby, joomla... in js/node: keystone (dead project), strapi, enduro, butter...