This is the whole file
PHP Code:
<?php
session_start();
$con = mysql_connect("XXXXXXXX","XXXXXXX","XXXXXX");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("XXXXXXXXXX", $con);
echo mysql_error();
function clean($str) {
$str = @trim($str);
if(get_magic_quotes_gpc()) {
$str = stripslashes($str);
}
return mysql_real_escape_string($str);
}
$make = clean($_POST['make']);
$model = clean($_POST['model']);
$serial = clean($_POST['serial']);
$comp1amps1 = clean($_POST['comp1amps1']);
$comp1amps2 = clean($_POST['comp1amps2']);
$comp1amps3 = clean($_POST['comp1amps3']);
$comp2amps1 = clean($_POST['comp2amps1']);
$comp2amps2 = clean($_POST['comp2amps2']);
$comp2amps3 = clean($_POST['comp2amps3']);
$suction = clean($_POST['suction']);
$discharge = clean($_POST['discharge']);
$suctiontemp = clean($_POST['suctiontemp']);
$dischargetemp = clean($_POST['dischargetemp']);
$condenceron = clean($_POST['condenceron']);
$condenceroff = clean($_POST['condenceroff']);
$leaktest = clean($_POST['leaktest']);
$clean = clean($_POST['clean']);
$saftey = clean($_POST['saftey']);
$fan1 = clean($_POST['fan1']);
$fan2 = clean($_POST['fan2']);
$fan3 = clean($_POST['fan3']);
$notes = clean($_POST['notes']);
mysql_query("UPDATE data SET make=$make, model=$model WHERE entryid=$_SESSION[id]");
echo mysql_error();
//mysql_query("UPDATE data SET dischargetemp=$dischargetemp, condenceron=$condenceron, condenceroff=$condenceroff, leaktest=$leaktest, clean=$clean, saftey=$saftey, fan1=$fan1, fan2=$fan2, fan3=$fan3, notes=$notes, WHERE id = $_SESSION[id] ");
//echo '<center><h2 style="color:white;">unit logged ID number is ', $_SESSION['id'];
//echo '</h2></center>
//<link href="style.css" rel="stylesheet" type="text/css" />
//<meta http-equiv="refresh" content="5; URL=index.php">
//<span id="countdown" style="position:absolute;bottom:0px;left:5px;color:yellow;font-size:200%">5</span>
// ';
?>
Bookmarks