new page being created from the admin

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
phpquery
Forum Newbie
Posts: 13
Joined: Thu Dec 04, 2008 3:29 am

new page being created from the admin

Post by phpquery »

Hi

I am looking for a suitable function whereby in the admin if i say add new page named "HOME" & then click on submit then a page named HOME.php or HOME.html should be automatically created in the same directory.

thanx in advance.

phpquery
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: new page being created from the admin

Post by papa »

What've you got so far ?
phpquery
Forum Newbie
Posts: 13
Joined: Thu Dec 04, 2008 3:29 am

Re: new page being created from the admin

Post by phpquery »

Hi Craven,

This is what i have done so far.

I now need to add a function whereby in the admin if i say add new page named "HOME" & then click on submit then a page named HOME.php or HOME.html should be automatically created in the same directory

<?php
if(isset($_POST['create']))
{
$fieldvalu=$_POST['field'];
$fieldmenu=$_POST['menu'];

}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>creat website menu</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<div align="center">
<table width="524" border="1">
<tr>
<td width="224"><div align="left">insert no of field </div></td>
<td width="284"><label>
<div align="left">
<input name="field" type="text" id="field" />
</div>
</label></td>
</tr>
<tr>
<td><div align="left">menu stile </div></td>
<td><label>
<div align="left">
<select name="menu" id="menu">
<option>horizontal</option>
<option>vertical</option>
</select>
</div>
</label></td>
</tr>
<tr>
<td colspan="2"><label>

<div align="center">
<label>
<input name="create" type="submit" id="create" value="create" />
</label>
</div>
</label></td>
</tr>
</table>
</div>
</form>
</body>
</html>



thanx,

phpquery
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: new page being created from the admin

Post by papa »

phpquery
Forum Newbie
Posts: 13
Joined: Thu Dec 04, 2008 3:29 am

Re: new page being created from the admin

Post by phpquery »

Hi craven,

this works for me.

thanx

php query
Post Reply