在表单提交时使用名为字段的页面名称创建php页面

在表单提交时使用名为字段的页面名称创建php页面

问题描述:

i would like to know how to get a page duplicated upon form submission.

For example, i am registering something on a form and upon the submission on the form, the php page gets called and information on the page is saved in the database (this works fine). There are several field in this form and one named "Acronym".

Upon submission, i want a page(present in the htdoc folder as i am using XAMPP) to be duplicated with the Acronym field as the name of the new php page

Anyone can give me some information about how to do this as i have no idea how to

Thank you

我想知道如何在表单提交时复制页面。 p>

提交后,我想要一个页面(在我使用XAMPP的htdoc文件夹中)与Acronym重复 字段作为新php页面的名称 p>

任何人都可以给我一些有关如何执行此操作的信息,因为我不知道如何 p>

谢谢 你 p> div>

Generally, websites don't create new pages for every user, but store information in a database and retrieve them. But if you want to create a new page:

$file = $_POST['Acronym'].".php"; $open = fopen($file, "w"); fwrite($open, $content); fclose($open)

Enter the contents of the page in $content.