One is The basic index.php, when you click a link on it it will give a small pop up of content_editor.php which includes the form to update the content (Unique Name right? =D) After you submit the form it will run update_content.php
update_content.php
<?php
$link = mysqli_connect("$server", "$user", "$pass", "$webdb");
$page = mysqli_real_escape_string($link, (string) $_POST['page']);
$content = mysqli_real_escape_string($link, (string) $_POST['content']);
$query = "UPDATE `pages`
SET `content`='$content'
WHERE `name`='$page'";
mysqli_query($link, $query);
mysqli_close($link);
?>
<script type='text/javascript'>
self.close();
</script>
index_content_editor.php
<form action="update_content.php" method="post">
<textarea name="content" cols="50" rows="10"></textarea>
<input type="hidden" name="page" value="Index" />
<br /><input type="submit" value="Update" />
</form>
Does anybody know a way that I can get it to automatically refresh the original index.php when the submit button is clicked?

New Topic/Question
Reply



MultiQuote



|