Simon336697
asked on
Creating a copy of a php page
Hi guys hope u r all well.
What Im trying to achieve as the final result is the following...
========================== ========== ========== ======== test.php
Please select what menu level you wish to create..
< select.... > <------------------- user selects from the following 4 files (templates)
-- menu1_x.php
-- menu2_x_x.php
-- menu3_x_x_x.php
-- menu4_x_x_x_x.php
<Create new file> <------------------------- - upon selecting above, they click on create new file
Enter new filename: ____________________ <-------- they enter a new filename here
<submit> <------------------------- ---------- --------- they click submit to have the new file created
========================== ========== ========== ========== =
# The 4 "template" files upon which a new file is created are as follows...
<docroot>/simeswiki/templa tes
menu1_x.php
menu2_x_x.php
menu3_x_x_x.php
menu4_x_x_x_x.php
So,
after the user selects one of these, this selection is used as the basis upon which to copy
eg. selection is menu2_x_x.php
Now, when the user clicks on create new file..... menu2_x_x.php
is the source file in the following.....
cp menu2_x_x.php <target_new_file>.php
New files to be saved in <docroot>/simeswiki
Any help on this would be greatly appreciated.
What Im trying to achieve as the final result is the following...
==========================
Please select what menu level you wish to create..
< select.... > <------------------- user selects from the following 4 files (templates)
-- menu1_x.php
-- menu2_x_x.php
-- menu3_x_x_x.php
-- menu4_x_x_x_x.php
<Create new file> <-------------------------
Enter new filename: ____________________ <-------- they enter a new filename here
<submit> <-------------------------
==========================
# The 4 "template" files upon which a new file is created are as follows...
<docroot>/simeswiki/templa
menu1_x.php
menu2_x_x.php
menu3_x_x_x.php
menu4_x_x_x_x.php
So,
after the user selects one of these, this selection is used as the basis upon which to copy
eg. selection is menu2_x_x.php
Now, when the user clicks on create new file..... menu2_x_x.php
is the source file in the following.....
cp menu2_x_x.php <target_new_file>.php
New files to be saved in <docroot>/simeswiki
Any help on this would be greatly appreciated.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks psimation..
ASKER
Mate thanks for your help.
So are you saying the below................
One of the "template" files I have is menu1_x.php
==========================
<body>
<div id="body_container">
<?php include ("includes/body_container.
</div>
</body>
</html>
==========================
are you saying to store the
<?php include ("includes/body_container.
in a database?