Lo all,
Had me head wrecked the whole week with a really stupid problem that came down to me not reading something but now when im running the php file i have errors switched on and i have bout 15 unidentified index but the problem is that i have used the code
to add a row of a table in my input form but i have alot of them and as you can see they start array lists. the code in me php to call these is
I also think this is stopping my mysql select statement as i use
where the error message
MySQL Error1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Float, Extension, Excusable, NonExcusable, Delays, Value, Liquid
comes. So is this connected and any1 ideas... im bout 99% positive me sql query is sound and i had ProjName in input form added so it wasnt that?
Had me head wrecked the whole week with a really stupid problem that came down to me not reading something but now when im running the php file i have errors switched on and i have bout 15 unidentified index but the problem is that i have used the code
Code:
function addActual()
{
var myTab = document.getElementById('myTable2');
var row=myTab.rows.length; var y=myTab.insertRow(row);
var a=y.insertCell(0);
var xx= document.createElement('input');
xx.type="text";
xx.name="Date[]";
a.appendChild(xx);
var b=y.insertCell(1);
var xx= document.createElement('input');
xx.type="text";
xx.name="Staff[]";
b.appendChild(xx);
var c=y.insertCell(2);
var xx= document.createElement('input');
xx.type="text";
xx.name="Wage[]";
c.appendChild(xx); var d=y.insertCell(3);
var xx= document.createElement('input');
xx.type="text";
xx.name="Hours[]";
}
Code:
$Date = $_POST['Date[]']; $Staff = $_POST['Staff[]']; $Wage = $_POST['Wage[]']; $Hours = $_POST['Hours[]'];
Code:
function getProjectDetails()
{
global $ProjName;
$temp = mysql_query("SELECT Float, Extension, Excusable, NonExcusable, Delays, Value, LiquidatedDamages, totalLiquidatedDamages
FROM ProjectDetails
WHERE Name= $ProjName")or die('<hr />MySQL Error1: ' .mysql_error(). '<hr />');
$row = mysql_fetch_array($temp);
return $row;
}
// A function to allow overall project variables to be manipulated.
function makeVariableProjectDetails()
{
global $projectFloat, $projectExtension, $projectExcusable, $projectNonExcusable,
$projectDelays, $projectValue, $liquidateddamages, $totalliquidateddamages;
$temp = getProjectDetails();
$projectFloat = $temp['ProjectFloat'];
$projectExtension = $temp['Extension'];
$projectExcusable = $temp['Excusable'];
$projectNonExcusable = $temp['NonExcusable'];
$projectDelays = $temp['Delays'];
$projectValue = $temp['Value'];
$liquidateddamages = $temp['LiquidatedDamages'];
$totalliquidateddamages = $temp['totalLiquidatedDamages'];
}
MySQL Error1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Float, Extension, Excusable, NonExcusable, Delays, Value, Liquid
comes. So is this connected and any1 ideas... im bout 99% positive me sql query is sound and i had ProjName in input form added so it wasnt that?
Comment