0) { $Command = "update ideas set title='$title', text='$text', ideas_category_id=$cat_id where id=$id"; mysql_db_query($db,$Command); } else { $Command = "insert into ideas (state_id,ideas_category_id,title,text,created,modified) values(2,$cat_id,'$title','$text',now(),now())"; mysql_db_query($db,$Command); } header("location: ".$WWW_Host."ideas/index.php"); exit; } elseif ($action=="delete") { $Command="update ideas set state_id=5, modified=now() where id=$id"; mysql_db_query($db,$Command); header("location: ".$WWW_Host."ideas/index.php"); exit; } elseif ($action=="update") { $Command="select title,text,ideas_category_id from ideas where id=$id"; $res = mysql_db_query($db,$Command); $title = mysql_result($res,0,0); $text = mysql_result($res,0,1); $cat_id = mysql_result($res,0,2); } } ?> Ideamanagement

Create or edit an idea

" method="post">
title
text

existing ideas


"; } ?>
"; echo $category .": "; echo $title.""; echo "
\n"; echo ""; echo ""; echo ""; echo "
"; echo "
"; echo "
"; echo ""; echo ""; echo ""; echo "
"; echo "
"; echo $text; echo " "; echo "