hi,
im gonna try and make a really basic CMS which i will problly call K.I.S.S CMS (Keep It Simple Stupid, in case you were wondering)
anyway im starting to make like the "install" script which will create a few files which the pages will refer to for infomation.
ill post em and u can try to see whats going wrong...
This is the first installl page, here you enter basic infomation such as webmaster email...
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Dansgalaxy's K.I.S.S CMS - Setup</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form method="post" action="install2.php">
Title: <input type="text" name="title" />
<br />
Admin email: <input type="text" name="adminemail" />
<br />
Webmaster Email: <input type="text" name="webmasteremail" />
<br />
URL of this site: <input type="text" name="coreurl" /> Please make like http://YOURSITE.co.uk Or http://YOURSITE.co.uk/kisscms. DO NOT add a trailing / (ie. http://yoursite.co.uk/kisscms/)
<br />
<br />
<input type="submit" value="Create" />
</form>
</body>
</html>
this info from this form is sent to install2.php
This is install2.php
PHP Code:
<html>
<head>
<title>Dansgalaxy's K.I.S.S CMS - Setup 3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
META Settings!
<br />
<br />
<form method="post" action="install3.php">
Meta info:
<br />
Author: <input type="text" name="metaauthor" />
<br />
Copyright: <input type="text" name="metacopyright" />
<br />
Robots: <select name="metarobots">
<option value="index">Index</option>
<option value="index, follow">Index, Follow</option>
<option value="noindex">Noindex</option>
<option value="noindex, nofollow">Noindex, Mofollow</option>
</select>
<br />
<!-- -->
Description:
<textarea name="metadescription">
</textarea>
<br />
Keywords:
<textarea name="metakeywords">
</textarea>
<br />
</form>
</body>
</html>
<?php
$config = "
$title = $_POST['title'];
$adminemail = $_POST['adminemail'];
$webmasteremail = $_POST['webmasteremail'];
$core = $_POST['coreurl'];
";
$config = "config.php";
$fh = fopen($answers, 'w') or die("Can't open file");
$stringData = "$allanswers\n";
fwrite($fh, $stringData);
/* $stringData = "Tracy Tanner\n";
fwrite($fh, $stringData);*/
fclose($fh);
?>
This script is SUPOSED to save the infomation from install.php as a file called config.php
it also has a form for entering other info for the metas which is sent to install3.php
install 3 will have the same structure as install2.php and will save the meta info as a file called metainfo.php which will be included in all of the websites webpages... anyways
i need the code in install2 in the $config ="" the things $_post need to be processed so it saves as $adminemail =
admin@dansgalaxy.co.uk (or whatever is enterd into the admin email field)
at the moment this script(s) save nothing and produce a error when i click send on install.php (
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in
M:\Server\xampp\htdocs\kisscms\install2.php on line
51)
Can someone help?
Lol if anyone understands what i just said that is...
Dan