Page 1 of 1

new page being created from the admin

Posted: Thu Dec 04, 2008 3:35 am
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

Re: new page being created from the admin

Posted: Thu Dec 04, 2008 3:36 am
by papa
What've you got so far ?

Re: new page being created from the admin

Posted: Thu Dec 04, 2008 3:57 am
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

Re: new page being created from the admin

Posted: Thu Dec 04, 2008 4:11 am
by papa

Re: new page being created from the admin

Posted: Thu Dec 04, 2008 4:23 am
by phpquery
Hi craven,

this works for me.

thanx

php query