Hi i have been building a simple cms and it is all working ok apart from the fact that i cannot update the database from the admin side.
Here is the update script that i have written:
<?php
include("dbconnect.inc");
$text = $_POST['text'];
if ($_POST[submit])
{
$sql = "UPDATE pages SET content = $text WHERE title = $update;";
$result = mysql_query($sql,$conn);
}
echo "<center><a href='index.php'>Update another page</a></center>";
echo $text."<br>"; //checking to see the variable exists (this is from the text form
echo $update; //check to see the variable exists, passing it in the url
?>
please help this is really annoying me!!!