Having trouble updating or inserting into a field in the db.
Other actions in other pages seems to work correctly.
What is my problem here?
10x helpers
echo "<form method=\"post\" action=\"index.php\">"
."<b>Text here:</b><br><textarea name=\"content\" value=\"$content\" cols=\"50\" rows=\"200\"></textarea>"
."<input type=\"hidden\" name=\"case\" value=\"update\">"
."<center><input type='submit' value='send'></center>"
."</form>";
switch($case) {
case "update":
update_news($content);
}
function update_news($content) {
global $db
$db->sql_query("UPDATE new_content SET stext = '$content' WHERE t_id = '1' ");
}