<li id="menu_active"><a href="http://ec2-52-69-89-129.ap-northeast-1.compute.amazonaws.com/site/index.html">Home</a></li> <!--<li><a href="Mission.html">Our Mission</a></li> --> <!--<li><a href="News.html">About us</a></li> --> <!--<li><a href="Help.html">How to Help</a></li> --> <li><a href="Contact.html">Contact</a></li> </ul> </nav> </div> <table> <form action="survey.php" method="post" role="form" name="f1"> <h3> <tr> <td>School Name: </td> <td> </h3><select name="school"> <?php $SqlContent = $Dbcon->ExecuteQuery("select school_name from school_info s,city c,users u where s.city_id=c.city_id and u.city=c.city_name"); $totalrows = $Dbcon->NumRows($SqlContent); while ($totalrows = $Dbcon->FetchArray($SqlContent)) { ?> <p class="small-paragraph"> <option value="<?php echo $totalrows['school_name']; ?> "><?php echo $totalrows['school_name']; ?> </option>
echo "at the start"; include "config.inc.php"; $Dbcon = new connection(); $Dbcon->localarea(); $schoolname = $_POST["school"]; $schoolauth = $_POST["schoolauth"]; $disasteraffected = $_POST["dis"]; $numberofstudents = $_POST["no"]; $studentpop = $_POST["pop"]; $dest = $_POST["dest"]; $comm = $_post["2"]; $amount = $_POST["amt"]; $constcost = $_POST["cost"]; $newresource = $_POST["newreso"]; $prone = $_POST["prone"]; $value = $disasteraffected * 5 + $numberofstudents / $studentpop * 4 + $dest * 3 + $newresource * 2 + $prone; if (isset($_POST["submit"])) { echo "inside submit"; $SqlContent1 = $Dbcon->ExecuteQuery("insert into survey values('','schoolname','{$schoolauth}','{$disasteraffected}','{$numberofstudents}',\n\t\t'{$studentpop}','{$dest}','{$comm}','{$constcost}','{$newresource}','{$prone}','{$amount}','{$value}')"); if ($SqlContent1) { echo "Your response has been recorded. Thank you."; mail("*****@*****.**", "My subject", "Your response"); } else { echo "Sorry! Your response could not be recorded."; } } else { echo "No submit"; } ?> </body> </html>
<table class="table"> <thead> <tr> <th>#</th> <th>SCHOOL NAME</th> <th>CONSTRUCTION COST</th> <th>AMOUNT BY COMMUNITY</th> <th>TOTAL FUNDS REQUIRED</th> </tr> </thead> <tbody> <?php $SqlContent = $Dbcon->ExecuteQuery("select school_name,construction_cost,amount from survey ORDER BY calc_value desc"); $totalrows = $Dbcon->NumRows($SqlContent); $i = 1; while ($totalrows = $Dbcon->FetchArray($SqlContent)) { ?> <tr> <td><?php echo $i; ?> </td> <td><?php echo $totalrows['school_name']; ?> </td> <td><?php echo $totalrows['construction_cost'];