<?php
session_start();
require ('header.html');
date_default_timezone_set('America/Los_Angeles');
if(isset($_SESSION['valid_user'])){
echo '<div class="content"><div class="item">';
require('dbc.php');
connect_db();
$query = "Select * FROM SitRepReport WHERE IncidentName = '{$_POST['IncidentName']}'";
if($r = mysql_query($query)){
while($row = mysql_fetch_array($r)){
(variable declarations)
}
}
if(isset($_POST['submit'])){
$problem = FALSE;
if(empty($_POST['A bunch of conditionals'])){
$problem = TRUE;
echo'<p><h2>Please go back you missed something!</h2></p>';
}
if(!$problem){
$updtQuery = "UPDATE SitRepReport SET Values";
if(@mysql_query($updtQuery)){
echo'<div class = "item"><h1>REPORT UPDATED</h1><p>Your report has been updated.</p></div>';
}else{
echo"<div class = \"item\"><h1>MySQL Error</h1><div class = \"descr\">Error Generated</div><p>Could not submit report because: <b>".mysql_error()."</b>. The query was $updtQuery.</p></div>";
}
}
}
echo'<form>Form is populated by above declared variables using MySQL</form>';
close_db();
}else{
echo '<h1>YOU ARE NOT LOGGED IN!</h1>';
}
require ('footer.html');
?>
Greetings experts,Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE