hey guys iam jsut learning coding so here is my first mod from scratch there is no recoding or anything build from ground up hope u like it
Replace helptutorial.php
with this
<?php
include "globals.php";
$q=mysql_query("SELECT * FROM helppage WHERE pageid=1", $c);
while($r=mysql_fetch_array($q))
{
print "<h3><center>{$r['pagetitle']}</h3>
<hr />
<br /><br />
{$r['helptext']}
</center>";
}
?>
make new page call it
helppage.php
<?php
include "sglobals.php";
if($ir['user_level'] > 2)
{
die("403");
}
if ($_POST['submit'])
{
$db->query("UPDATE helppage SET pagetitle='{$_POST['pagetitle']}', helptext='{$_POST['helptext']}' WHERE pageid='1'");
print "Helppage Updated<br /><br />
<a href='helppage.php'>Go Back</a>";
}
else
{
$q=mysql_query("SELECT * FROM helppage WHERE pageid=1", $c);
while($r=mysql_fetch_array($q))
{
print "<h3>Help Edit</h3><hr />
<form action='helppage.php' method='post'>
<input type='hidden' name='submit' value='helppage' />
Header: <input type='text' name='pagetitle' value='{$r['pagetitle']}' /><br />
Help Text:<br />
<textarea rows='7' cols='50' name='helptext'>{$r['helptext']}</textarea><br />
<input type='submit' value='Update' /></form>";
print "<center><font color=red><h3>HTML Allowed</h3></font></center>";
}
}
?>
Your Sql
not really good with them but i will give it a try
CREATE TABLE IF NOT EXISTS `helppage` (
`pageid` int(11) NOT NULL auto_increment,
`pagetitle` varchar(255) NOT NULL default '',
`pagetext` text NOT NULL default'',
PRIMARY KEY (`pageid`)
);
add to SQL
INSERT INTO helppage VALUES('1','Game Tutorial','enter here');
add your like to smenu
<a href='helppage.php'>Edit Page Tutorial</a>
and your done. hope u like it