I have this script working for the most part so far, but there must be an error in a loop or code that is adding the Final Period Payout in the second and third Final Period Payouts
and I believe that the same error is affecting the display block.
please see
www.bayparkcapital.com/G.phpthanks for the help.
<?php
//connect to server
$mysqli = mysqli_connect("");
$username = $_SESSION['loggedin'];
//gather the topics
$get_topics_sql = "SELECT topic_id, topic_title, DATE_FORMAT(topic_create_t
ime, '%b %e %Y at %r') aS fmt_topic_create_time, topic_owner, INV_ID,INV_U_N, MS_F_NAME, MS_ID, CONT_DIST_1_1_08, cf_1_1_00, cf_2_1_00, cf_3_1_00, cf_4_1_00, cf_5_1_00, cf_6_1_00, cf_7_1_00, cf_8_1_00, cf_9_1_00, cf_10_1_00, cf_11_1_00, cf_12_1_00, cf_1_1_01, cf_2_1_01, cf_3_1_01, cf_4_1_01, cf_5_1_01, cf_6_1_01, cf_7_1_01, cf_8_1_01, cf_9_1_01, cf_10_1_01, cf_11_1_01, cf_12_1_01, cf_1_1_02, cf_2_1_02, cf_3_1_02, cf_4_1_02, cf_5_1_02, cf_6_1_02, cf_7_1_02, cf_8_1_02, cf_9_1_02, cf_10_1_02, cf_11_1_02, cf_12_1_02, cf_1_1_03, cf_2_1_03, cf_3_1_03, cf_4_1_03, cf_5_1_03, cf_6_1_03, cf_7_1_03, cf_8_1_03, cf_9_1_03, cf_10_1_03, cf_11_1_03, cf_12_1_03, cf_1_1_04, cf_2_1_04, cf_3_1_04, cf_4_1_04, cf_5_1_04, cf_6_1_04, cf_7_1_04, cf_8_1_04, cf_9_1_04, cf_10_1_04, cf_11_1_04, cf_12_1_04, cf_1_1_05, cf_2_1_05, cf_3_1_05, cf_4_1_05, cf_5_1_05, cf_6_1_05, cf_7_1_05, cf_8_1_05, cf_9_1_05, cf_10_1_05, cf_11_1_05, cf_12_1_05, cf_1_1_06, cf_2_1_06, cf_3_1_06, cf_4_1_06, cf_5_1_06, cf_6_1_06, cf_7_1_06, cf_8_1_06, cf_9_1_06, cf_10_1_06, cf_11_1_06, cf_12_1_06, cf_1_1_07, cf_2_1_07, cf_3_1_07, cf_4_1_07, cf_5_1_07, cf_6_1_07, cf_7_1_07, cf_8_1_07, cf_9_1_07, cf_10_1_07, cf_11_1_07, cf_12_1_07, cf_1_1_08, cf_2_1_08, cf_3_1_08, cf_4_1_08, cf_5_1_08, cf_6_1_08, cf_7_1_08, cf_8_1_08, cf_9_1_08, cf_10_1_08, cf_11_1_08, cf_12_1_08 FROM invdb ORDER BY topic_create_time DESC";
$get_topics_res = mysqli_query($mysqli, $get_topics_sql) or die(mysqli_error($mysqli))
;
if (mysqli_num_rows($get_topi
cs_res) < 1) {
//there are no topics, so say so
$display_block = "<p><em>No topics exist.</em></p>";
} else {
//create the display string
$display_block
?>
<table cellpadding="4" cellspacing="1" border="1" border-color="black" style="font-size:10px" >
<tr>
<th>Cash Flow Mo
nth_Year</
th>
<th>12_08</th>
<th>11_08</th>
<th>10_08</th>
<th>9_08</th>
<th>8_08</th>
<th>7_08</th>
<th>6_08</th>
<th>5_08</th>
<th>4_08</th>
<th>3_08</th>
<th>2_08</th>
<th>1_08</th>
<th>12_07</th>
<th>11_07</th>
<th>10_07</th>
<th>9_07</th>
<th>8_07</th>
<th>7_07</th>
<th>6_07</th>
<th>5_07</th>
<th>4_07</th>
<th>3_07</th>
<th>2_07</th>
<th>1_07</th>
<th>12_06</th>
<th>11_06</th>
<th>10_06</th>
<th>9_06</th>
<th>8_06</th>
<th>7_06</th>
<th>6_06</th>
<th>5_06</th>
<th>4_06</th>
<th>3_06</th>
<th>2_06</th>
<th>1_06</th>
<th>12_05</th>
<th>11_05</th>
<th>10_05</th>
<th>9_05</th>
<th>8_05</th>
<th>7_05</th>
<th>6_05</th>
<th>5_05</th>
<th>4_05</th>
<th>3_05</th>
<th>2_05</th>
<th>1_05</th>
<th>12_04</th>
<th>11_04</th>
<th>10_04</th>
<th>9_04</th>
<th>8_04</th>
<th>7_04</th>
<th>6_04</th>
<th>5_04</th>
<th>4_04</th>
<th>3_04</th>
<th>2_04</th>
<th>1_04</th>
<th>12_03</th>
<th>11_03</th>
<th>10_03</th>
<th>9_03</th>
<th>8_03</th>
<th>7_03</th>
<th>6_03</th>
<th>5_03</th>
<th>4_03</th>
<th>3_03</th>
<th>2_03</th>
<th>1_03</th>
<th>12_02</th>
<th>11_02</th>
<th>10_02</th>
<th>9_02</th>
<th>8_02</th>
<th>7_02</th>
<th>6_02</th>
<th>5_02</th>
<th>4_02</th>
<th>3_02</th>
<th>2_02</th>
<th>1_02</th>
<th>12_01</th>
<th>11_01</th>
<th>10_01</th>
<th>9_01</th>
<th>8_01</th>
<th>7_01</th>
<th>6_01</th>
<th>5_01</th>
<th>4_01</th>
<th>3_01</th>
<th>2_01</th>
<th>1_01</th>
<th>12_00</th>
<th>11_00</th>
<th>10_00</th>
<th>9_00</th>
<th>8_00</th>
<th>7_00</th>
<th>6_00</th>
<th>5_00</th>
<th>4_00</th>
<th>3_00</th>
<th>2_00</th>
<th>1_00</th>
</tr>
<?php
while ($topic_info = mysqli_fetch_array($get_to
pics_res))
{
$p = array('cf_12_1_08','cf_11_
1_08','cf_
10_1_08','
cf_9_1_08'
);
$topic_id = $topic_info['topic_id'];
$topic_title = stripslashes($topic_info['
topic_titl
e']);
$topic_create_time = $topic_info['fmt_topic_cre
ate_time']
;
$topic_owner = stripslashes($topic_info['
topic_owne
r']);
$filename = stripslashes($topic_info['
filename']
);
$topic_id = $topic_info['topic_id'];
$topic_title = stripslashes($topic_info['
topic_titl
e']);
$topic_create_time = $topic_info['fmt_topic_cre
ate_time']
;
$topic_owner = stripslashes($topic_info['
topic_owne
r']);
$filename = stripslashes($topic_info['
filename']
);
$INV_ID = stripslashes($topic_info['
INV_ID']);
$INV_U_N = stripslashes($topic_info['
INV_U_N'])
;
$MS_F_NAME = stripslashes($topic_info['
MS_F_NAME'
]);
$MS_ID = stripslashes($topic_info['
MS_ID']);
$CHECK = stripslashes($topic_info['
CHECK']);
$INV_ID = stripslashes($topic_info['
INV_ID']);
$MS_INV_ID = stripslashes($topic_info['
MS_INV_ID'
]);
$CONT_DIST_1_1_08 = stripslashes($topic_info['
CONT_DIST_
1_1_08']);
$payoff = 10000;
$cf_12_1_08 = stripslashes($topic_info['
cf_12_1_08
']);
$cf_11_1_08 = stripslashes($topic_info['
cf_11_1_08
']);
$cf_10_1_08 = stripslashes($topic_info['
cf_10_1_08
']);
$cf_9_1_08 = stripslashes($topic_info['
cf_9_1_08'
]);
$cf_8_1_08 = stripslashes($topic_info['
cf_8_1_08'
]);
$cf_7_1_08 = stripslashes($topic_info['
cf_7_1_08'
]);
$cf_6_1_08 = stripslashes($topic_info['
cf_6_1_08'
]);
$cf_5_1_08 = stripslashes($topic_info['
cf_5_1_08'
]);
$cf_4_1_08 = stripslashes($topic_info['
cf_4_1_08'
]);
$cf_3_1_08 = stripslashes($topic_info['
cf_3_1_08'
]);
$cf_2_1_08 = stripslashes($topic_info['
cf_2_1_08'
]);
$cf_1_1_08 = stripslashes($topic_info['
cf_1_1_08'
]);
$cf_12_1_07 = stripslashes($topic_info['
cf_12_1_07
']);
$cf_11_1_07 = stripslashes($topic_info['
cf_11_1_07
']);
$cf_10_1_07 = stripslashes($topic_info['
cf_10_1_07
']);
$cf_9_1_07 = stripslashes($topic_info['
cf_9_1_07'
]);
$cf_8_1_07 = stripslashes($topic_info['
cf_8_1_07'
]);
$cf_7_1_07 = stripslashes($topic_info['
cf_7_1_07'
]);
$cf_6_1_07 = stripslashes($topic_info['
cf_6_1_07'
]);
$cf_5_1_07 = stripslashes($topic_info['
cf_5_1_07'
]);
$cf_4_1_07 = stripslashes($topic_info['
cf_4_1_07'
]);
$cf_3_1_07 = stripslashes($topic_info['
cf_3_1_07'
]);
$cf_2_1_07 = stripslashes($topic_info['
cf_2_1_07'
]);
$cf_1_1_07 = stripslashes($topic_info['
cf_1_1_07'
]);
$cf_12_1_06 = stripslashes($topic_info['
cf_12_1_06
']);
$cf_11_1_06 = stripslashes($topic_info['
cf_11_1_06
']);
$cf_10_1_06 = stripslashes($topic_info['
cf_10_1_06
']);
$cf_9_1_06 = stripslashes($topic_info['
cf_9_1_06'
]);
$cf_8_1_06 = stripslashes($topic_info['
cf_8_1_06'
]);
$cf_7_1_06 = stripslashes($topic_info['
cf_7_1_06'
]);
$cf_6_1_06 = stripslashes($topic_info['
cf_6_1_06'
]);
$cf_5_1_06 = stripslashes($topic_info['
cf_5_1_06'
]);
$cf_4_1_06 = stripslashes($topic_info['
cf_4_1_06'
]);
$cf_3_1_06 = stripslashes($topic_info['
cf_3_1_06'
]);
$cf_2_1_06 = stripslashes($topic_info['
cf_2_1_06'
]);
$cf_1_1_06 = stripslashes($topic_info['
cf_1_1_06'
]);
$cf_12_1_05 = stripslashes($topic_info['
cf_12_1_05
']);
$cf_11_1_05 = stripslashes($topic_info['
cf_11_1_05
']);
$cf_10_1_05 = stripslashes($topic_info['
cf_10_1_05
']);
$cf_9_1_05 = stripslashes($topic_info['
cf_9_1_05'
]);
$cf_8_1_05 = stripslashes($topic_info['
cf_8_1_05'
]);
$cf_7_1_05 = stripslashes($topic_info['
cf_7_1_05'
]);
$cf_6_1_05 = stripslashes($topic_info['
cf_6_1_05'
]);
$cf_5_1_05 = stripslashes($topic_info['
cf_5_1_05'
]);
$cf_4_1_05 = stripslashes($topic_info['
cf_4_1_05'
]);
$cf_3_1_05 = stripslashes($topic_info['
cf_3_1_05'
]);
$cf_2_1_05 = stripslashes($topic_info['
cf_2_1_05'
]);
$cf_1_1_05 = stripslashes($topic_info['
cf_1_1_05'
]);
$cf_12_1_04 = stripslashes($topic_info['
cf_12_1_04
']);
$cf_11_1_04 = stripslashes($topic_info['
cf_11_1_04
']);
$cf_10_1_04 = stripslashes($topic_info['
cf_10_1_04
']);
$cf_9_1_04 = stripslashes($topic_info['
cf_9_1_04'
]);
$cf_8_1_04 = stripslashes($topic_info['
cf_8_1_04'
]);
$cf_7_1_04 = stripslashes($topic_info['
cf_7_1_04'
]);
$cf_6_1_04 = stripslashes($topic_info['
cf_6_1_04'
]);
$cf_5_1_04 = stripslashes($topic_info['
cf_5_1_04'
]);
$cf_4_1_04 = stripslashes($topic_info['
cf_4_1_04'
]);
$cf_3_1_04 = stripslashes($topic_info['
cf_3_1_04'
]);
$cf_2_1_04 = stripslashes($topic_info['
cf_2_1_04'
]);
$cf_1_1_04 = stripslashes($topic_info['
cf_1_1_04'
]);
$cf_12_1_03 = stripslashes($topic_info['
cf_12_1_03
']);
$cf_11_1_03 = stripslashes($topic_info['
cf_11_1_03
']);
$cf_10_1_03 = stripslashes($topic_info['
cf_10_1_03
']);
$cf_9_1_03 = stripslashes($topic_info['
cf_9_1_03'
]);
$cf_8_1_03 = stripslashes($topic_info['
cf_8_1_03'
]);
$cf_7_1_03 = stripslashes($topic_info['
cf_7_1_03'
]);
$cf_6_1_03 = stripslashes($topic_info['
cf_6_1_03'
]);
$cf_5_1_03 = stripslashes($topic_info['
cf_5_1_03'
]);
$cf_4_1_03 = stripslashes($topic_info['
cf_4_1_03'
]);
$cf_3_1_03 = stripslashes($topic_info['
cf_3_1_03'
]);
$cf_2_1_03 = stripslashes($topic_info['
cf_2_1_03'
]);
$cf_1_1_03 = stripslashes($topic_info['
cf_1_1_03'
]);
$cf_12_1_02 = stripslashes($topic_info['
cf_12_1_02
']);
$cf_11_1_02 = stripslashes($topic_info['
cf_11_1_02
']);
$cf_10_1_02 = stripslashes($topic_info['
cf_10_1_02
']);
$cf_9_1_02 = stripslashes($topic_info['
cf_9_1_02'
]);
$cf_8_1_02 = stripslashes($topic_info['
cf_8_1_02'
]);
$cf_7_1_02 = stripslashes($topic_info['
cf_7_1_02'
]);
$cf_6_1_02 = stripslashes($topic_info['
cf_6_1_02'
]);
$cf_5_1_02 = stripslashes($topic_info['
cf_5_1_02'
]);
$cf_4_1_02 = stripslashes($topic_info['
cf_4_1_02'
]);
$cf_3_1_02 = stripslashes($topic_info['
cf_3_1_02'
]);
$cf_2_1_02 = stripslashes($topic_info['
cf_2_1_02'
]);
$cf_1_1_02 = stripslashes($topic_info['
cf_1_1_02'
]);
$cf_12_1_01 = stripslashes($topic_info['
cf_12_1_01
']);
$cf_11_1_01 = stripslashes($topic_info['
cf_11_1_01
']);
$cf_10_1_01 = stripslashes($topic_info['
cf_10_1_01
']);
$cf_9_1_01 = stripslashes($topic_info['
cf_9_1_01'
]);
$cf_8_1_01 = stripslashes($topic_info['
cf_8_1_01'
]);
$cf_7_1_01 = stripslashes($topic_info['
cf_7_1_01'
]);
$cf_6_1_01 = stripslashes($topic_info['
cf_6_1_01'
]);
$cf_5_1_01 = stripslashes($topic_info['
cf_5_1_01'
]);
$cf_4_1_01 = stripslashes($topic_info['
cf_4_1_01'
]);
$cf_3_1_01 = stripslashes($topic_info['
cf_3_1_01'
]);
$cf_2_1_01 = stripslashes($topic_info['
cf_2_1_01'
]);
$cf_1_1_01 = stripslashes($topic_info['
cf_1_1_01'
]);
$cf_12_1_00 = stripslashes($topic_info['
cf_12_1_00
']);
$cf_11_1_00 = stripslashes($topic_info['
cf_11_1_00
']);
$cf_10_1_00 = stripslashes($topic_info['
cf_10_1_00
']);
$cf_9_1_00 = stripslashes($topic_info['
cf_9_1_00'
]);
$cf_8_1_00 = stripslashes($topic_info['
cf_8_1_00'
]);
$cf_7_1_00 = stripslashes($topic_info['
cf_7_1_00'
]);
$cf_6_1_00 = stripslashes($topic_info['
cf_6_1_00'
]);
$cf_5_1_00 = stripslashes($topic_info['
cf_5_1_00'
]);
$cf_4_1_00 = stripslashes($topic_info['
cf_4_1_00'
]);
$cf_3_1_00 = stripslashes($topic_info['
cf_3_1_00'
]);
$cf_2_1_00 = stripslashes($topic_info['
cf_2_1_00'
]);
$cf_1_1_00 = stripslashes($topic_info['
cf_1_1_00'
]);
$seq = array( $cf_12_1_08,
$cf_11_1_08,
$cf_10_1_08,
$cf_9_1_08,
$cf_8_1_08,
$cf_7_1_08,
$cf_6_1_08,
$cf_5_1_08,
$cf_4_1_08,
$cf_3_1_08,
$cf_2_1_08,
$cf_1_1_08,
$cf_12_1_07,
$cf_11_1_07,
$cf_10_1_07,
$cf_9_1_07,
$cf_8_1_07,
$cf_7_1_07,
$cf_6_1_07,
$cf_5_1_07,
$cf_4_1_07,
$cf_3_1_07,
$cf_2_1_07,
$cf_1_1_07,
$cf_12_1_06,
$cf_11_1_06,
$cf_10_1_06,
$cf_9_1_06,
$cf_8_1_06,
$cf_7_1_06,
$cf_6_1_06,
$cf_5_1_06,
$cf_4_1_06,
$cf_3_1_06,
$cf_2_1_06,
$cf_1_1_06,
$cf_12_1_05,
$cf_11_1_05,
$cf_10_1_05,
$cf_9_1_05,
$cf_8_1_05,
$cf_7_1_05,
$cf_6_1_05,
$cf_5_1_05,
$cf_4_1_05,
$cf_3_1_05,
$cf_2_1_05,
$cf_1_1_05,
$cf_12_1_04,
$cf_11_1_04,
$cf_10_1_04,
$cf_9_1_04,
$cf_8_1_04,
$cf_7_1_04,
$cf_6_1_04,
$cf_5_1_04,
$cf_4_1_04,
$cf_3_1_04,
$cf_2_1_04,
$cf_1_1_04,
$cf_12_1_03,
$cf_11_1_03,
$cf_10_1_03,
$cf_9_1_03,
$cf_8_1_03,
$cf_7_1_03,
$cf_6_1_03,
$cf_5_1_03,
$cf_4_1_03,
$cf_3_1_03,
$cf_2_1_03,
$cf_1_1_03,
$cf_12_1_02,
$cf_11_1_02,
$cf_10_1_02,
$cf_9_1_02,
$cf_8_1_02,
$cf_7_1_02,
$cf_6_1_02,
$cf_5_1_02,
$cf_4_1_02,
$cf_3_1_02,
$cf_2_1_02,
$cf_1_1_02,
$cf_12_1_01,
$cf_11_1_01,
$cf_10_1_01,
$cf_9_1_01,
$cf_8_1_01,
$cf_7_1_01,
$cf_6_1_01,
$cf_5_1_01,
$cf_4_1_01,
$cf_3_1_01,
$cf_2_1_01,
$cf_1_1_01,
$cf_12_1_00,
$cf_11_1_00,
$cf_10_1_00,
$cf_9_1_00,
$cf_8_1_00,
$cf_7_1_00,
$cf_6_1_00,
$cf_5_1_00,
$cf_4_1_00,
$cf_3_1_00,
$cf_2_1_00,
$cf_1_1_00,
);
//add to display
$display_block .= "
<tr>
<td>".$topic_create_time."
</td>
<th>".$final_period."</th>
<th>".$cf_11_1_08."</th>
<th>".$cf_10_1_08."</th>
<th>".$cf_9_1_08."</th>
<th>".$cf_8_1_08."</th>
<th>".$cf_7_1_08."</th>
<th>".$cf_6_1_08."</th>
<th>".$cf_5_1_08."</th>
<th>".$cf_4_1_08."</th>
<th>".$cf_3_1_08."</th>
<th>".$cf_2_1_08."</th>
<th>".$cf_1_1_08."</th>
<th>".$cf_12_1_07."</th>
<th>".$cf_11_1_07."</th>
<th>".$cf_10_1_07."</th>
<th>".$cf_9_1_07."</th>
<th>".$cf_8_1_07."</th>
<th>".$cf_7_1_07."</th>
<th>".$cf_6_1_07."</th>
<th>".$cf_5_1_07."</th>
<th>".$cf_4_1_07."</th>
<th>".$cf_3_1_07."</th>
<th>".$cf_2_1_07."</th>
<th>".$cf_1_1_07."</th>
<th>".$cf_12_1_06."</th>
<th>".$cf_11_1_06."</th>
<th>".$cf_10_1_06."</th>
<th>".$cf_9_1_06."</th>
<th>".$cf_8_1_06."</th>
<th>".$cf_7_1_06."</th>
<th>".$cf_6_1_06."</th>
<th>".$cf_5_1_06."</th>
<th>".$cf_4_1_06."</th>
<th>".$cf_3_1_06."</th>
<th>".$cf_2_1_06."</th>
<th>".$cf_1_1_06."</th>
<th>".$cf_12_1_05."</th>
<th>".$cf_11_1_05."</th>
<th>".$cf_10_1_05."</th>
<th>".$cf_9_1_05."</th>
<th>".$cf_8_1_05."</th>
<th>".$cf_7_1_05."</th>
<th>".$cf_6_1_05."</th>
<th>".$cf_5_1_05."</th>
<th>".$cf_4_1_05."</th>
<th>".$cf_3_1_05."</th>
<th>".$cf_2_1_05."</th>
<th>".$cf_1_1_05."</th>
<th>".$cf_12_1_04."</th>
<th>".$cf_11_1_04."</th>
<th>".$cf_10_1_04."</th>
<th>".$cf_9_1_04."</th>
<th>".$cf_8_1_04."</th>
<th>".$cf_7_1_04."</th>
<th>".$cf_6_1_04."</th>
<th>".$cf_5_1_04."</th>
<th>".$cf_4_1_04."</th>
<th>".$cf_3_1_04."</th>
<th>".$cf_2_1_04."</th>
<th>".$cf_1_1_04."</th>
<th>".$cf_12_1_03."</th>
<th>".$cf_11_1_03."</th>
<th>".$cf_10_1_03."</th>
<th>".$cf_9_1_03."</th>
<th>".$cf_8_1_03."</th>
<th>".$cf_7_1_03."</th>
<th>".$cf_6_1_03."</th>
<th>".$cf_5_1_03."</th>
<th>".$cf_4_1_03."</th>
<th>".$cf_3_1_03."</th>
<th>".$cf_2_1_03."</th>
<th>".$cf_1_1_03."</th>
<th>".$cf_12_1_02."</th>
<th>".$cf_11_1_02."</th>
<th>".$cf_10_1_02."</th>
<th>".$cf_9_1_02."</th>
<th>".$cf_8_1_02."</th>
<th>".$cf_7_1_02."</th>
<th>".$cf_6_1_02."</th>
<th>".$cf_5_1_02."</th>
<th>".$cf_4_1_02."</th>
<th>".$cf_3_1_02."</th>
<th>".$cf_2_1_02."</th>
<th>".$cf_1_1_02."</th>
<th>".$cf_12_1_01."</th>
<th>".$cf_11_1_01."</th>
<th>".$cf_10_1_01."</th>
<th>".$cf_9_1_01."</th>
<th>".$cf_8_1_01."</th>
<th>".$cf_7_1_01."</th>
<th>".$cf_6_1_01."</th>
<th>".$cf_5_1_01."</th>
<th>".$cf_4_1_01."</th>
<th>".$cf_3_1_01."</th>
<th>".$cf_2_1_01."</th>
<th>".$cf_1_1_01."</th>
<th>".$cf_12_1_00."</th>
<th>".$cf_11_1_00."</th>
<th>".$cf_10_1_00."</th>
<th>".$cf_9_1_00."</th>
<th>".$cf_8_1_00."</th>
<th>".$cf_7_1_00."</th>
<th>".$cf_6_1_00."</th>
<th>".$cf_5_1_00."</th>
<th>".$cf_4_1_00."</th>
<th>".$cf_3_1_00."</th>
<th>".$cf_2_1_00."</th>
<th>".$cf_1_1_00."</th>
</tr>
";
// foreach($seq as $key => $value) { print ":$key => $value <br/>"; }
$cashflow = array( $cf_12_1_08,
$cf_11_1_08,
$cf_10_1_08,
$cf_9_1_08,
$cf_8_1_08,
$cf_7_1_08,
$cf_6_1_08,
$cf_5_1_08,
$cf_4_1_08,
$cf_3_1_08,
$cf_2_1_08,
$cf_1_1_08,
$cf_12_1_07,
$cf_11_1_07,
$cf_10_1_07,
$cf_9_1_07,
$cf_8_1_07,
$cf_7_1_07,
$cf_6_1_07,
$cf_5_1_07,
$cf_4_1_07,
$cf_3_1_07,
$cf_2_1_07,
$cf_1_1_07,
$cf_12_1_06,
$cf_11_1_06,
$cf_10_1_06,
$cf_9_1_06,
$cf_8_1_06,
$cf_7_1_06,
$cf_6_1_06,
$cf_5_1_06,
$cf_4_1_06,
$cf_3_1_06,
$cf_2_1_06,
$cf_1_1_06,
$cf_12_1_05,
$cf_11_1_05,
$cf_10_1_05,
$cf_9_1_05,
$cf_8_1_05,
$cf_7_1_05,
$cf_6_1_05,
$cf_5_1_05,
$cf_4_1_05,
$cf_3_1_05,
$cf_2_1_05,
$cf_1_1_05,
$cf_12_1_04,
$cf_11_1_04,
$cf_10_1_04,
$cf_9_1_04,
$cf_8_1_04,
$cf_7_1_04,
$cf_6_1_04,
$cf_5_1_04,
$cf_4_1_04,
$cf_3_1_04,
$cf_2_1_04,
$cf_1_1_04,
$cf_12_1_03,
$cf_11_1_03,
$cf_10_1_03,
$cf_9_1_03,
$cf_8_1_03,
$cf_7_1_03,
$cf_6_1_03,
$cf_5_1_03,
$cf_4_1_03,
$cf_3_1_03,
$cf_2_1_03,
$cf_1_1_03,
$cf_12_1_02,
$cf_11_1_02,
$cf_10_1_02,
$cf_9_1_02,
$cf_8_1_02,
$cf_7_1_02,
$cf_6_1_02,
$cf_5_1_02,
$cf_4_1_02,
$cf_3_1_02,
$cf_2_1_02,
$cf_1_1_02,
$cf_12_1_01,
$cf_11_1_01,
$cf_10_1_01,
$cf_9_1_01,
$cf_8_1_01,
$cf_7_1_01,
$cf_6_1_01,
$cf_5_1_01,
$cf_4_1_01,
$cf_3_1_01,
$cf_2_1_01,
$cf_1_1_01,
$cf_12_1_00,
$cf_11_1_00,
$cf_10_1_00,
$cf_9_1_00,
$cf_8_1_00,
$cf_7_1_00,
$cf_6_1_00,
$cf_5_1_00,
$cf_4_1_00,
$cf_3_1_00,
$cf_2_1_00,
$cf_1_1_00,
);
{
$period_to_solve = 12;
$rate = 0.15;
//First sum all of the period there is info for!
for ($x=0; $x<$period_to_solve; $x++)
{
$sum += $cashflow[$x] / pow($rate + 1, $x);
}
// NPV = {sum} + x/(1+rate)^4
// -{sum} * (1+rate)^4 = x
$final_period = 0 - $sum * pow(1+$rate,$period_to_sol
ve);
?><p><strong>Discounted Cash Flow Sum Through 11-08</strong>: <?
echo $sum;
}
?>
</p>
<p><strong>Final Period Payout</strong>:
<?php echo $final_period;?>
</p>
<? print_r($cashflow) ;
}
//free results
mysqli_free_result($get_to
pics_res);
//close connection to mysqli
mysqli_close($mysqli);
//close up the table
$display_block .= "</table>";
}
?>
<html>
<head>
<meta http-equiv="content-Type" content="text/html; charset=iso-8859-1" /><meta name="keywords" content="Members Page">
<meta name="Description" content="Members Page">
<title>Member Page</title>
<link rel="stylesheet" type="text/css" media="screen" href="/images/style_032508
.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/images/style_032508
1.css" />
<link rel="stylesheet" type="text/css" media="screen" href="style_032508.css" />
<link rel="stylesheet" type="text/css" media="screen" href="style_0325081.css" />
</head>
<div id="nav_top"><a href="/">Home</a> | <a href="/about">About Us</a> | <a href="/contact">Contact</a
> | <a href="/site map">Site Map</a>| <a href="/login">Log Out</a></div>
<div id="bkg" style="width:auto;">
<div id="body" style="font-size:10px; ">
<p><span class="heading" style="width:600px; padding-top:20px;">View Your Internal Rate of Return</span></p>
<?php echo $display_block; ?></th>
<?php //foreach($seq as $key => $value) { print ":$key => $value <br/>"; } ?>
</div>
</div>
</body>
</html>
Start Free Trial