Hey guys, yes my problem is very, very trivial and im sure it does not rank importance to be posted but im really frustrated. See my coding was fine as in it executed as i wanted it to and now i dont know why but it isn't and i have zero idea coz i did not change anything. I was testing the webpages and this page all of a sudden did not execute.
the file is also included into another file (the main file) e.g main file is income.php and theres this code :<?php include "january.php";?>
january.php:
<?php
if($_SESSION['name'])
{
if(isset($_POST['octsave']))
{
$octrent = $_POST['octrent'];
$octelectric = $_POST['octelectric'];
$octwater = $_POST['octwater'];
$octgrocery = $_POST['octgrocery'];
$octinternet = $_POST['octinternet'];
$octphone = $_POST['octphone'];
$octcable = $_POST['octcable'];
$octhothers = $_POST['octhothers'];
$octcharity = $_POST['octcharity'];
$octparents = $_POST['octparents'];
$octchild = $_POST['octchild'];
$octtravel = $_POST['octtravel'];
$octshop = $_POST['octshop'];
$octeat = $_POST['octeat'];
$octentertain = $_POST['octentertain'];
$octmisc = $_POST['octmisc'];
$octpublic = $_POST['octpublic'];
$octinsurance = $_POST['octinsurance'];
$octpay = $_POST['octpay'];
$octservice = $_POST['octservice'];
$octpetrol = $_POST['octpetrol'];
$octmisc = $_POST['octmisc'];
$octtothers = $_POST['octtothers'];
$octtax = $_POST['octtax'];
$omonth = $_POST['oct'];
if($omonth&&$octrent&&$octelectric&&$octwater&&$octgrocery&&$octinternet&&$octphone&&$octcable&&$octhothers&&$octtax)
{
require "connect.php";
$oname=$_SESSION['name'];
$octhtotal=$octrent+$octelectric+$octwater+$octgrocery+$octinternet+$octphone+$octcable+$octhothers+$octtax;
$query=("INSERT INTO house VALUES ('$oname','$omonth','$octrent','$octelectric','$octwater','$octgrocery','$octinternet','$octphone','$octcable','$octhothers','$octtax','$octhtotal')");
$octhresult=mysql_query($query);
}
if($omonth&&$octcharity&&$octparents&&$octchild&&$octtravel&&$octshop&&$octeat&&$octentertain&&$octmisc)
{
require "connect.php";
$oname=$_SESSION['name'];
$octptotal=$octcharity+$octparents+$octchild+$octtravel+$octshop+$octeat+$octentertain+$octmisc;
$query=("INSERT INTO personal VALUES ('$oname','$omonth','$octcharity','$octparents','$octchild','$octtravel','$octshop','$octeat','$octentertain','$octmisc','$octptotal')");
$octpresult=mysql_query($query);
}
if($omonth&&$octpublic&&$octinsurance&&$octpay&&$octservice&&$octpetrol&&$octtothers)
{
require "connect.php";
$oname=$_SESSION['name'];
$octttotal=$octpublic+$octinsurance+$octpay+$octservice+$octpetrol+$octtothers;
$query=("INSERT INTO transport VALUES ('$oname','$omonth','$octpublic','$octinsurance','$octpay','$octservice','$octpetrol','$octtothers','$octttotal')");
$octtresult=mysql_query($query);
}
}
}
?>
<html>
<body>
<center><div class="tabcontent" id="oct">
<center><h2>October</h2></center>
<div style="height:0px;">
<form method="post" action="expenses.php">
<input type="hidden" value="October" name="oct">
<center><div id="Oaccordion" style="height:350px;width:400px;margin-top:30px;">
<label class="house">HOUSE</label>
<table class="thouse" border="1" rules="none" cellpadding="6px" width="400px">
<tr>
<th></th>
<th></th>
<th>RM</th>
</tr>
<tr>
<td>Rent/Mortgage</td>
<td></td>
<td style="text-align:center"><input type="text" name="octrent" placeholder="0" size="11"></td>
</tr>
<tr>
<td>Electricity Bill</td>
<td></td>
<td style="text-align:center"><input type="text" name="octelectric" placeholder="0" size="11"></td>
</tr>
<tr>
<td>Water Bill</td>
<td></td>
<td style="text-align:center"><input type="text" name="octwater" size="11" placeholder="0"></td>
</tr>
<tr>
<td>Groceries <dfn>(Foodstuffs and various house supplies)</dfn></td>
<td></td>
<td style="text-align:center"><input type="text" name="octgrocery" size="11" placeholder="0"></td>
</tr>
<tr>
<td>Internet Service</td>
<td></td>
<td style="text-align:center"><input type="text" name="octinternet" size="11" placeholder="0"></td>
</tr>
<tr>
<td>Phone Service</td>
<td></td>
<td style="text-align:center"><input type="text" name="octphone" size="11" placeholder="0"></td>
</tr>
<tr>
<td>Cable Service <dfn>(Television)</dfn></td>
<td></td>
<td style="text-align:center"><input type="text" name="octcable" size="11" placeholder="0"></td>
</tr>
<tr>
<td>Tax</td>
<td></td>
<td style="text-align:center"><input type="text" name="octtax" size="11" placeholder="0" value="<?php if(isset($_POST['octtax'])){echo htmlentities($_POST['octtax']);} ?>"></td>
</tr>
<tr>
<td>Others</td>
<td></td>
<td style="text-align:center"><input type="text" name="octhothers" size="11" placeholder="0" value="<?php if(isset($_POST['octhhothers'])){echo htmlentities($_POST['octhothers']);} ?>"></td>
</tr>
</table>
<label class="personal">PERSONAL</label>
<table class="tpersonal" border="1" rules="none" cellpadding="6px" width="400px">
<tr>
<th></th>
<th></th>
<th>RM</th>
</tr>
<tr>
<td>Charity <dfn>(Zakat/Donation etc)</dfn></td>
<td></td>
<td style="text-align:center"><input type="text" name="octcharity" size="11" placeholder="0" value="<?php if(isset($_POST['octcharity'])){echo htmlentities($_POST['octcharity']);} ?>"></td>
</tr>
<tr>
<td>Parents</td>
<td></td>
<td style="text-align:center"><input type="text" name="octparents" size="11" placeholder="0" value="<?php if(isset($_POST['octparents'])){echo htmlentities($_POST['octparents']);} ?>"></td>
</tr>
<tr>
<td>Children</td>
<td></td>
<td style="text-align:center"><input type="text" name="octchild" size="11" placeholder="0" value="<?php if(isset($_POST['octchild'])){echo htmlentities($_POST['octchild']);} ?>"></td>
</tr>
<tr>
<td>Travelling</td>
<td></td>
<td style="text-align:center"><input type="text" name="octtravel" size="11" placeholder="0" value="<?php if(isset($_POST['octtravel'])){echo htmlentities($_POST['octtravel']);} ?>"></td>
</tr>
<tr>
<td>Shopping <dfn>(Clothes/Shoes etc)</dfn></td>
<td></td>
<td style="text-align:center"><input type="text" name="octshop" size="11" placeholder="0" value="<?php if(isset($_POST['octshop'])){echo htmlentities($_POST['octshop']);} ?>"></td>
</tr>
<tr>
<td>Eating Out</td>
<td></td>
<td style="text-align:center"><input type="text" name="octeat" size="11" placeholder="0" value="<?php if(isset($_POST['octeat'])){echo htmlentities($_POST['octeat']);} ?>"></td>
</tr>
<tr>
<td>Entertainment <dfn>(Movies/Theme Park)</dfn></td>
<td></td>
<td style="text-align:center"><input type="text" name="octentertain" size="11" placeholder="0" value="<?php if(isset($_POST['octentertain'])){echo htmlentities($_POST['octentertain']);} ?>"></td>
</tr>
<tr>
<td>Miscellaneous</td>
<td></td>
<td style="text-align:center"><input type="text" name="octmisc" size="11" placeholder="0" value="<?php if(isset($_POST['octmisc'])){echo htmlentities($_POST['octmisc']);} ?>"></td>
</tr>
</table>
<label class="transport">TRANSPORTATION</label>
<table class="ttransport" border="1" rules="none" cellpadding="6px" width="400px" style="background-color:AntiqueWhite;">
<tr>
<th></th>
<th></th>
<th>RM</th>
</tr>
<tr>
<td>Public Transport</td>
<td></td>
<td style="text-align:center"><input type="text" name="octpublic" size="11" placeholder="0" value="<?php if(isset($_POST['octpublic'])){echo htmlentities($_POST['octpublic']);} ?>"></td>
</tr>
<tr>
<td>Car Insurance/Road Tax</td>
<td></td>
<td style="text-align:center"><input type="text" name="octinsurance" size="11" placeholder="0" value="<?php if(isset($_POST['octinsurance'])){echo htmlentities($_POST['octinsurance']);} ?>"></td>
</tr>
<tr>
<td>Car Payment</td>
<td></td>
<td style="text-align:center"><input type="text" name="octpay" size="11" placeholder="0" value="<?php if(isset($_POST['octpay'])){echo htmlentities($_POST['octpay']);} ?>"></td>
</tr>
<tr>
<td>Car Servicing</td>
<td></td>
<td style="text-align:center"><input type="text" name="octservice" size="11" placeholder="0" value="<?php if(isset($_POST['octservice'])){echo htmlentities($_POST['octservice']);} ?>"></td>
</tr>
<tr>
<td>Petrol</td>
<td></td>
<td style="text-align:center"><input type="text" name="octpetrol" size="11" placeholder="0" value="<?php if(isset($_POST['octpetrol'])){echo htmlentities($_POST['octpetrol']);} ?>"></td>
</tr>
<tr>
<td>Others</td>
<td></td>
<td style="text-align:center"><input type="text" name="octtothers" size="11" placeholder="0" value="<?php if(isset($_POST['octtothers'])){echo htmlentities($_POST['octtothers']);} ?>"></td>
</tr>
</table>
</div></center>
<center><input type="submit" class="esave" name="octsave" value="Save"></center>
</form>
</div>
</div></center>
</body>
</html>
thanks in advance and sorry in advance if this seems really noob-ish but yeah that what i am. sorry guys