I am certain that my code is correct, and before you say the file is called whatever.html I am positive that it is a .php It displays ALL of my code, and not starting from a specific point, oh and btw PHP works on other pages of mine. So PHP is installed Here is my code:
<?
include("include/session.php");
$ASID = $_GET['id'];
$BOATNAME = $_GET['moorings'];
$LoginName = 'Log in';
if($session->logged_in){
$LoginName = 'Account Center';
}
$con = mysql_connect("********","******","*************2");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("****", $con);
$query = "select * from **** where **** like '$ASID' AND BoatName like '$BOATNAME'";
$result = mysql_query($query) or die("Couldn't execute query");
while ($row= mysql_fetch_array($result)) {
$MooringList = $row["MooringList"];
$MooringList2 = $row["MooringList2"];
$Number = $row["Number"];
$Latitude = $row["Latitude"];
$Latitude2 = $row["Latitude2"];
$Latitude3 = $row["Latitude3"];
$Longitude = $row["Longitude"];
$Longitude2 = $row["Longitude2"];
$Longitude3 = $row["Longitude3"];
$Schedule = $row["Schedule"];
$ScheduleCD = $row["ScheduleCD"];
$MoorLengthFT = $row["MoorLengthFT"];
$MoorLengthMtrs = $row["MoorLengthMTRS"];
$MoorTonnage = $row["MoorTonnage"];
$Layer = $row["Layer"];
$BoatName = $row["BoatName"];
$BoatType = $row["BoatType"];
$BoatLengthFT = $row["BoatLengthFT"];
$BoatLengthMTRS = $row["BoatLengthMTRS"];
$BoatInsurance = $row["BoatInsurance"];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>**** - Add Mooring</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="js/jquery-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#myform").validate({
debug: false,
rules: {
Number:"required"
},
messages: {
Number:"* The number can't be blank"
},
submitHandler: function(form) {
// do other stuff for a valid form
$.post('addMooringScript.php', $("#myform").serialize(), function(data) {
$('#result').html(data);
});
}
});
});
</script>
<style>
label.error { width: 250px; display: inline; color: red;}
</style>
</head>
<body>
<div id="header">
<h1>******</h1>
<div id="loginDetails">
<? include('loggedInTopStatus.php'); ?>
</div>
</div>
<div class="content"><br />
<div id="news">
<div id="right">
<form name="myform" id="myform" action="" method="POST">
<h2>Moorings - Add</h2>
<div id="result"></div>
<table width = "2000" border="0">
<tr width="1000">
<input type="hidden" name="AssignedTo" value ="<? $_POST['id'] ?> "/>
<tr>
<td width="50px">Mooring List: </td>
<td>
<input type="text" name="MooringList" size="5" value="<? echo $MooringList; ?>" />
<input type="text" name="MooringList2" size="20" value="<? echo $MooringList2; ?>" />
</tr></td>
<tr><td width="50px">Number: </td><td><input type="text" name="Number" maxlength="30" value="<? echo $Number ?>"></td></td>
<tr><td width="50px">Latitude: </td><td>
<input type="text" name="Latitude" size="3" value="<? echo $Latitude; ?>" />O
<input type="text" name="Latitude2" size="3" value="<? echo $Latitude2; ?>" />' .
<input type="text" name="Latitude3" size="5" value="<? echo $Latitude3; ?>" />
</tr></td>
<tr><td width="50px">Longitude: </td><td>
<input type="text" name="Longitude" size="3" value="<? echo $Longitude; ?>" />O
<input type="text" name="Longitude2" size="3" value="<? echo $Longitude2; ?>" />' .
<input type="text" name="Longitude3" size="5" value="<? echo $Longitude3; ?>" />
</tr></td>
<tr><td width="50px">Schedule: </td><td>
<input type="text" name="Schedule" size="3" /> CD
<input type="text" name="ScheduleMtrs" size="3" /> Mtrs
</tr></td>
<tr><td width="50px">Moor Length: </td><td>
<input type="text" name="Moorlength" size="3" /> FT
<input type="text" name="MoorlengthMtrs" size="3" /> Mtrs
</tr></td>
<tr><td width="50px">Moor Tonnage: </td><td>
<input type="text" name="MoorTonnage" size="4" />
</tr></td>
<tr><td width="50px">Layer: </td><td>
<input type="text" name="Layer" size="8" />
</tr></td>
<tr><td width="50px">Boat Name: </td><td>
<input type="text" name="BoatName" size="15" />
<input type="radio" name="BoatType" value="Leisure" /><b> Leisure </b>
</tr></td>
<tr><td width="50px">Type: </td><td>
<input type="text" name="Type" size="15" />
<input type="radio" name="BoatType" value="Commercial" /> <b>Commercial </b>
</tr></td>
<tr><td width="50px">Length: </td><td>
<input type="text" name="LengthFt" size="8" />Ft
<input type="text" name="LengthMtrs" size="8" />Mtrs
</tr></td>
<tr><td width="50px">Insurance: </td><td>
<input type="text" name="Insurance" size="18" />
</tr></td>
</tr>
<input type="hidden" name="id" value="<? echo $_GET['id']; ?>" />
<tr><td><input type="submit" value="Edit Mooring" /> </tr></td>
</table>
</form>
</div>
<div class="left">
<? include('sitemenu.php'); ?>
</div>
<br />
<div id="footer">
<a href="#">© 2010 *****</a>
</div>
</div>
</div>
</body>
</html>
Ayrıca, ben filtre var nerede nessasary