Edwardp
07-23-2004, 06:07 AM
Line: 18
Char: 18
Error: expected ')'
Code: 0
URL: http://localhost/project4/viewBuffer.php?build=8888
I have the above error. Is the error on the page given in the url?? or is it in the page that it calls next?
how do line numbers work?? are they literal, ie like when using notepad?
what does the char point to? is this literal?
They dont seem to help much
Thanx
Edwardp
07-23-2004, 07:00 AM
Below is the entire code for my page, its only a bufferpage, it isnt intended to show anything.
i put an 'echo' at the beginning of the php part of the script to see if the page loads, it does but then i still get the error as in my previous post but line 20 (due to inputting a couple of extra lines).
I still get the same error message from IE, why is a ')' expected when a bracket isn't even opened first?
sorry for posting it all but it gives you an idea on what the page does
<head>
<script language="javascript">
function openURL(dat1, dat2, dat3, dat4, dat5){
var selectYear = dat1
var selectModel = dat2
var selectRange = dat3
var selectChassis = dat4
var selectType = dat5
var dataString = "selectYear="+selectYear+"&selectModel="+selectModel+"&selectRange="+selectRange+"&selectChassis="+selectChassis+"&selectType="+selectType
alert(dataString)
parent.document.getElementById('view').src="view.php?"+dataString
}
</script>
</head>
<?php
echo "viewBuffer.php";
$buildNumber = $_POST['build'];
$conn=odbc_connect('ProjectTestDbase','','');
(!$conn) ? exit("Connection Failed: " . $conn) : (print '');
$sql="SELECT Year.Year, Model.Model, Range.Range, Chassis.Chassis, Type.Type FROM [Year] INNER JOIN (Model INNER JOIN (Type INNER JOIN (Range INNER JOIN (Chassis INNER JOIN (StandardBuild INNER JOIN Builds ON StandardBuild.StandardBuildNum = Builds.StandardBuildNum) ON Chassis.chassisID = StandardBuild.ChassisID) ON Range.rangeID = StandardBuild.RangeID) ON Type.typeID = StandardBuild.TypeID) ON (Model.modelID = Range.modelID) AND (Model.modelID = StandardBuild.ModelID)) ON (Year.yearID = Model.yearID) AND (Year.yearID = StandardBuild.YearID) WHERE (((Builds.BuildNum)='$buildNumber'))";
$rs=odbc_exec($conn,$sql);
!($rs) ? exit("Error in SQL") : (print'');
while (odbc_fetch_row($rs)){
$data0=odbc_result($rs,1);
$data1=odbc_result($rs,2);
$data2=odbc_result($rs,3);
$data3=odbc_result($rs,4);
$data4=odbc_result($rs,5);
}
odbc_close($conn);
?>
<body onload="openURL('<?php echo $data0; ?>','<?php echo $data1; ?>',<?php echo $data2; ?>','<?php echo $data3; ?>','<?php echo $data4; ?>')">
</body>
Thanx in advance