JezK
Edit File: page5App.php
<?php session_start(); include("main.php"); if(!isset($_SESSION['userID'])) { echo "<script>location.replace('../page1.php');</script>"; } //echo "<pre>";print_r($_POST);exit; $userID = $_SESSION['userID']; $grossIncomeY3 = $_POST['grossIncomeY3']; $grossIncomeY2 = $_POST['grossIncomeY2']; $grossIncomeY1 = $_POST['grossIncomeY1']; $expenditureY3 = $_POST['expenditureY3']; $expenditureY2 = $_POST['expenditureY2']; $expenditureY1 = $_POST['expenditureY1']; $grossProfitY3 = isset($_POST['grossProfitY3'])?$_POST['grossProfitY3']:''; $grossProfitY2 = isset($_POST['grossProfitY2'])?$_POST['grossProfitY2']:''; $grossProfitY1 = isset($_POST['grossProfitY1'])?$_POST['grossProfitY1']:''; $netWorthY3 = $_POST['netWorthY3']; $netWorthY2 = $_POST['netWorthY2']; $netWorthY1 = $_POST['netWorthY1']; $netWorthNextY3 = $_POST['netWorthNextY3']; $netWorthNextY2 = $_POST['netWorthNextY2']; $netWorthNextY1 = $_POST['netWorthNextY1']; $salesY3 = $_POST['salesY3']; $salesY2 = $_POST['salesY2']; $salesY1 = $_POST['salesY1']; $salesNextY3 = $_POST['salesNextY3']; $salesNextY2 = $_POST['salesNextY2']; $salesNextY1 = $_POST['salesNextY1']; $netProfitY3 = $_POST['netProfitY3']; $netProfitY2 = $_POST['netProfitY2']; $netProfitY1 = $_POST['netProfitY1']; $netProfitNextY3 = $_POST['netProfitNextY3']; $netProfitNextY2 = $_POST['netProfitNextY2']; $netProfitNextY1 = $_POST['netProfitNextY1']; $depriciationNextY3 = $_POST['depriciationNextY3']; $depriciationNextY2 = $_POST['depriciationNextY2']; $depriciationNextY1 = $_POST['depriciationNextY1']; $depriciationY3 = $_POST['depriciationY3']; $depriciationY2 = $_POST['depriciationY2']; $depriciationY1 = $_POST['depriciationY1']; $interestNextY3 = $_POST['interestNextY3']; $interestNextY2 = $_POST['interestNextY2']; $interestNextY1 = $_POST['interestNextY1']; $interestY3 = $_POST['interestY3']; $interestY2 = $_POST['interestY2']; $interestY1 = $_POST['interestY1']; $loanAvailedY3 = $_POST['loanAvailedY3']; $loanAvailedY2 = $_POST['loanAvailedY2']; $loanAvailedY1 = $_POST['loanAvailedY1']; $loanRepaidY3 = $_POST['loanRepaidY3']; $loanRepaidY2 = $_POST['loanRepaidY2']; $loanRepaidY1 = $_POST['loanRepaidY1']; $loanAmount = $_POST['loanAmount']; $futureYear3 = isset($_POST['futureYear3'])?$_POST['futureYear3']:''; $futureYear2 = isset($_POST['futureYear2'])?$_POST['futureYear2']:''; $futureYear1 = isset($_POST['futureYear1'])?$_POST['futureYear1']:''; $repaymentDescription = isset($_POST['repaymentDescription'])?$_POST['repaymentDescription']:""; $loanPurpose = $_POST['loanPurpose']; $userFile = $_FILES['excelFile']; if(isset($userFile['name'])) { if($userFile['size'] > 0) { $file = $userFile['name']; $file = str_replace(' ','_',$file); $path = '../'; $targetDirectory = 'uploads/'; $fileName1=time().$file; $fileName = $targetDirectory.$fileName1; if(move_uploaded_file($userFile['tmp_name'], $path.$fileName)) { $result = $sli->saveSLIUserFiles($userID,7,$fileName1); if($result == -3) { $flag = 0; $_SESSION['excelFileSaveFailed'] = 1; echo "<script>location.replace('../page5.php');</script>"; } } else { $flag = 0; $_SESSION['excelFileUploadFailed'] = 1; echo "<script>location.replace('../page5.php');</script>"; } } } $result = $sli->savePage5($userID,$grossIncomeY3,$grossIncomeY2,$grossIncomeY1,$expenditureY3,$expenditureY2,$expenditureY1,$grossProfitY3,$grossProfitY2,$grossProfitY1,$netWorthY3,$netWorthY2,$netWorthY1,$salesY3,$salesY2,$salesY1,$netProfitY3,$netProfitY2,$netProfitY1,$depriciationY3,$depriciationY2,$depriciationY1,$interestY3,$interestY2,$interestY1,$loanAvailedY3,$loanAvailedY2,$loanAvailedY1,$loanRepaidY3,$loanRepaidY2,$loanRepaidY1,$loanAmount,$repaymentDescription,$loanPurpose,$futureYear3,$futureYear2,$futureYear1,$interestNextY3,$interestNextY2,$interestNextY1,$depriciationNextY3,$depriciationNextY2,$depriciationNextY1,$netProfitNextY3,$netProfitNextY2,$netProfitNextY1,$salesNextY3,$salesNextY2,$salesNextY1,$netWorthNextY3,$netWorthNextY2,$netWorthNextY1,$futureYear3,$futureYear2,$futureYear1); if($result == -3) { $_SESSION['page5SaveFailed'] = 1; echo "<script>location.replace('../page5.php');</script>"; } else { //success $_SESSION['saveSuccess'] = 1; echo "<script>location.replace('../page6.php');</script>"; } ?>