Current location: Hot Scripts Forums » Programming Languages » PHP » submit pb


submit pb

Reply
  #1 (permalink)  
Old 05-27-05, 10:25 AM
jahar jahar is offline
New Member
 
Join Date: May 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
submit pb

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!!!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Engine Submit Script BornMunson Script Requests 0 05-20-05 02:48 AM
How to submit a form using a link, not a submit button? Myke311 HTML/XHTML/XML 3 01-12-05 02:26 AM
Submit button on forms civrob PHP 4 08-10-04 05:22 PM
submit form with more than one href submit and no submit button adlinfanus JavaScript 1 03-09-04 07:45 AM
3 submit buttons, I want one of them to be used when hitting enter. blasto333 HTML/XHTML/XML 2 02-21-04 04:24 PM


All times are GMT -5. The time now is 11:12 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.