ghostrider1 Posted October 14, 2006 Share Posted October 14, 2006 Hello everyone, I am fairly new to PHP and I got this project to fix... I need some help though, and im hoping someone can give me a hand...Ok.. This site has a admin.php page, in this page, you can add departments and subdepartments, when I add a sub department, I fill all the blanks and submit the request... well.. the same page comes up without any subdepartments listed... I believe they are not being stored in the database..Look at this code please and tell me if this might be a connection/permissions issue:case 'addsubdepartment':$display = 4;$newChoice='Add Sub Department';break;case 'Add Sub Department':if ($_REQUEST['start'] == ''){$_REQUEST['start'] = 0;}$message=$department->SubDepartmentValidation();if($message==''){$extension = split('\.', $_FILES['subdeptphoto']['name']);$photoext = $extension[sizeof($extension) - 1];$extension = split('\.', $_FILES['subdeptdoc']['name']);$docext = $extension[sizeof($extension) - 1];$extension = split('\.', $_FILES['subdeptvideo']['name']);$videoext = $extension[sizeof($extension) - 1];$department->SetSubDepartment($_REQUEST,$photoext,$docext,$videoext);$subdeptId = $department->AddSubDepartment();if($_FILES['subdeptphoto']['name']){upload_once($subdeptId,$_FILES,'subdeptphoto',$photoext);}if($_FILES['subdeptdoc']['name']){upload_documents($subdeptId,$_FILES,'subdeptdoc',$docext);}if($_FILES['subdeptvideo']['name']){upload_videos($subdeptId,$_FILES,'subdeptvideo',$videoext);}$department->GetSubDepartmentById($_REQUEST['deptid'],'limit '.$_REQUEST['start'].','.$_REQUEST['noofrecords']);$display = 3;}else{$department->mDbArr=$_REQUEST;$display = 4;$newChoice='Add Sub Department';}break; Quote Link to comment Share on other sites More sharing options...
Mortier Posted October 17, 2006 Share Posted October 17, 2006 This code doesn't make any sense to me, I think we need more sufficient code too solve this problem :)SQL query could be a problem. And I do not see any in this code. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.