Hi
This is my script
include_once("/var/www/html/management/library/config.inc.php");
include_once(COMMON);
include_once(TEMPLATE);
session_start();
$d = db_c();
if (!logged_in()) {
header("Location: ".PHP_LOGIN_ERROR);
exit;
}
$template=new Template;
//trim any white space
$edit_note=tidy_passed($_POST);
// Check that a project ID was set
if(isset($_GET["project_ID"])){
$project_ID = (int)$_GET["project_ID"];
// Get current details from database
$s1="SELECT Notes FROM Project WHERE ProjectID = $project_ID LIMIT 1";
$q1=db_q($s1);
$r1=db_r($q1);
$edit_note =$r1["Notes"];
$mode = "edit";
if(isset($POST["submit"])){
$mode = "add";
if($POST["submit"]=="Cancel"){
header("Location: ".PHP_PROJECTS_DETAILS."?project_ID=".$project_ID);
exit;
}
echo "fgdg";
// Update database with latest saved details
$s2 = "UPDATE Project SET Notes = \"".$edit_note["Notes"]."\"
WHERE ProjectID = $project_ID LIMIT 1";
db_q($s2);
header("Location: ".PHP_PROJECTS_DETAILS."?project_ID=".$project_ID);
exit;
}
}
$template->assign("edit_note",$edit_note);
$template->assign("mode",$mode);
$template->assign("privileges",get_priv($people));
$template->assign("tiltle","Edit a note");
$template->display(TPL_EDIT_NOTE);
db_d($d);
the pb is when I submit the form nothing hapend. If I try to echo something after $_POST["submit"] I've got nothing as well.
Please can someone help this newbie!!!
:queasy: