ag3nt42 Posted June 30, 2008 Share Posted June 30, 2008 ERROR!: Parse error: syntax error, unexpected T_VARIABLE in Ces_info.php on line 181 I cannot find a syntax error.. anyhelp is always appreciated.. thanks, ag3nt <?php session_start(); require('../../config.php'); $Success="False"; /////////////////////// //* OPEN CONNECTION *// /////////////////////// $con = mssql_connect($dblocation,$dbusername,$dbpassword); if (!$con) { die('Could not connect: ' . mssql_error()); } mssql_select_db($dbname, $con); /////////////////////////////////// //*******************************// //* Snatch Database Information *// //*******************************// /////////////////////////////////// //* STOP THE BITCHING *// - !IMPORTANT! //# QTYZ $SQL = "SELECT [Equipment#] FROM [".$tblpre."Equipment]"; $result = mssql_query($SQL) or die(mssql_error()); $count=mssql_num_rows(mssql_query($SQL)); while($row=mssql_fetch_row($result)) { $Z=$row[0]; } /////////////////////////////// //***************************// //* Harvest Input Variables *// //***************************// /////////////////////////////// //Equipment# if(!(isset($_POST['Item#1']))){$Item1='';}else{$Item1=$_POST['Item#1'];} if(!(isset($_POST['Item#2']))){$Item2='';}else{$Item2=$_POST['Item#2'];} if(!(isset($_POST['Item#3']))){$Item3='';}else{$Item3=$_POST['Item#3'];} if(!(isset($_POST['Item#4']))){$Item4='';}else{$Item4=$_POST['Item#4'];} if(!(isset($_POST['Item#5']))){$Item5='';}else{$Item5=$_POST['Item#5'];} if(!(isset($_POST['Item#6']))){$Item6='';}else{$Item6=$_POST['Item#6'];} if(!(isset($_POST['Item#7']))){$Item7='';}else{$Item7=$_POST['Item#7'];} if(!(isset($_POST['Item#8']))){$Item8='';}else{$Item8=$_POST['Item#8'];} if(!(isset($_POST['Item#9']))){$Item9='';}else{$Item9=$_POST['Item#9'];} if(!(isset($_POST['Item#10']))){$Item10='';}else{$Item10=$_POST['Item#10'];} if(!(isset($_POST['Item#11']))){$Item11='';}else{$Item11=$_POST['Item#11'];} if(!(isset($_POST['Item#12']))){$Item12='';}else{$Item12=$_POST['Item#12'];} if(!(isset($_POST['Item#13']))){$Item13='';}else{$Item13=$_POST['Item#13'];} if(!(isset($_POST['Item#14']))){$Item14='';}else{$Item14=$_POST['Item#14'];} if(!(isset($_POST['Item#15']))){$Item15='';}else{$Item15=$_POST['Item#15'];} if(!(isset($_POST['Item#16']))){$Item16='';}else{$Item16=$_POST['Item#16'];} if(!(isset($_POST['Item#17']))){$Item17='';}else{$Item17=$_POST['Item#17'];} if(!(isset($_POST['Item#18']))){$Item18='';}else{$Item18=$_POST['Item#18'];} if(!(isset($_POST['Item#19']))){$Item19='';}else{$Item19=$_POST['Item#19'];} if(!(isset($_POST['Item#20']))){$Item20='';}else{$Item20=$_POST['Item#20'];} //Description if(!(isset($_POST['Item1D']))){$Item1D='';}else{$Item1D=$_POST['Item1D'];} if(!(isset($_POST['Item2D']))){$Item2D='';}else{$Item2D=$_POST['Item2D'];} if(!(isset($_POST['Item3D']))){$Item3D='';}else{$Item3D=$_POST['Item3D'];} if(!(isset($_POST['Item4D']))){$Item4D='';}else{$Item4D=$_POST['Item4D'];} if(!(isset($_POST['Item5D']))){$Item5D='';}else{$Item5D=$_POST['Item5D'];} if(!(isset($_POST['Item6D']))){$Item6D='';}else{$Item6D=$_POST['Item6D'];} if(!(isset($_POST['Item7D']))){$Item7D='';}else{$Item7D=$_POST['Item7D'];} if(!(isset($_POST['Item8D']))){$Item8D='';}else{$Item8D=$_POST['Item8D'];} if(!(isset($_POST['Item9D']))){$Item9D='';}else{$Item9D=$_POST['Item9D'];} if(!(isset($_POST['Item10D']))){$Item10D='';}else{$Item10D=$_POST['Item10D'];} if(!(isset($_POST['Item11D']))){$Item11D='';}else{$Item11D=$_POST['Item11D'];} if(!(isset($_POST['Item12D']))){$Item12D='';}else{$Item12D=$_POST['Item12D'];} if(!(isset($_POST['Item13D']))){$Item13D='';}else{$Item13D=$_POST['Item13D'];} if(!(isset($_POST['Item14D']))){$Item14D='';}else{$Item14D=$_POST['Item14D'];} if(!(isset($_POST['Item15D']))){$Item15D='';}else{$Item15D=$_POST['Item15D'];} if(!(isset($_POST['Item16D']))){$Item16D='';}else{$Item16D=$_POST['Item16D'];} if(!(isset($_POST['Item17D']))){$Item17D='';}else{$Item17D=$_POST['Item17D'];} if(!(isset($_POST['Item18D']))){$Item18D='';}else{$Item18D=$_POST['Item18D'];} if(!(isset($_POST['Item19D']))){$Item19D='';}else{$Item19D=$_POST['Item19D'];} if(!(isset($_POST['Item20D']))){$Item20D='';}else{$Item20D=$_POST['Item20D'];} //Qty if(!(isset($_POST['Item1Q']))){$Item1Q='';}else{$Item1Q=$_POST['Item1Q'];} if(!(isset($_POST['Item2Q']))){$Item2Q='';}else{$Item2Q=$_POST['Item2Q'];} if(!(isset($_POST['Item3Q']))){$Item3Q='';}else{$Item3Q=$_POST['Item3Q'];} if(!(isset($_POST['Item4Q']))){$Item4Q='';}else{$Item4Q=$_POST['Item4Q'];} if(!(isset($_POST['Item5Q']))){$Item5Q='';}else{$Item5Q=$_POST['Item5Q'];} if(!(isset($_POST['Item6Q']))){$Item6Q='';}else{$Item6Q=$_POST['Item6Q'];} if(!(isset($_POST['Item7Q']))){$Item7Q='';}else{$Item7Q=$_POST['Item7Q'];} if(!(isset($_POST['Item8Q']))){$Item8Q='';}else{$Item8Q=$_POST['Item8Q'];} if(!(isset($_POST['Item9Q']))){$Item9Q='';}else{$Item9Q=$_POST['Item9Q'];} if(!(isset($_POST['Item10Q']))){$Item10Q='';}else{$Item10Q=$_POST['Item10Q'];} if(!(isset($_POST['Item11Q']))){$Item11Q='';}else{$Item11Q=$_POST['Item11Q'];} if(!(isset($_POST['Item12Q']))){$Item12Q='';}else{$Item12Q=$_POST['Item12Q'];} if(!(isset($_POST['Item13Q']))){$Item13Q='';}else{$Item13Q=$_POST['Item13Q'];} if(!(isset($_POST['Item14Q']))){$Item14Q='';}else{$Item14Q=$_POST['Item14Q'];} if(!(isset($_POST['Item15Q']))){$Item15Q='';}else{$Item15Q=$_POST['Item15Q'];} if(!(isset($_POST['Item16Q']))){$Item16Q='';}else{$Item16Q=$_POST['Item16Q'];} if(!(isset($_POST['Item17Q']))){$Item17Q='';}else{$Item17Q=$_POST['Item17Q'];} if(!(isset($_POST['Item18Q']))){$Item18Q='';}else{$Item18Q=$_POST['Item18Q'];} if(!(isset($_POST['Item19Q']))){$Item19Q='';}else{$Item19Q=$_POST['Item19Q'];} if(!(isset($_POST['Item20Q']))){$Item20Q='';}else{$Item20Q=$_POST['Item20Q'];} //ChargeAmount if(!(isset($_POST['Item1A']))){$Item1A='';}else{$Item1A=$_POST['Item1A'];} if(!(isset($_POST['Item2A']))){$Item2A='';}else{$Item2A=$_POST['Item2A'];} if(!(isset($_POST['Item3A']))){$Item3A='';}else{$Item3A=$_POST['Item3A'];} if(!(isset($_POST['Item4A']))){$Item4A='';}else{$Item4A=$_POST['Item4A'];} if(!(isset($_POST['Item5A']))){$Item5A='';}else{$Item5A=$_POST['Item5A'];} if(!(isset($_POST['Item6A']))){$Item6A='';}else{$Item6A=$_POST['Item6A'];} if(!(isset($_POST['Item7A']))){$Item7A='';}else{$Item7A=$_POST['Item7A'];} if(!(isset($_POST['Item8A']))){$Item8A='';}else{$Item8A=$_POST['Item8A'];} if(!(isset($_POST['Item9A']))){$Item9A='';}else{$Item9A=$_POST['Item9A'];} if(!(isset($_POST['Item10A']))){$Item10A='';}else{$Item10A=$_POST['Item10A'];} if(!(isset($_POST['Item11A']))){$Item11A='';}else{$Item11A=$_POST['Item11A'];} if(!(isset($_POST['Item12A']))){$Item12A='';}else{$Item12A=$_POST['Item12A'];} if(!(isset($_POST['Item13A']))){$Item13A='';}else{$Item13A=$_POST['Item13A'];} if(!(isset($_POST['Item14A']))){$Item14A='';}else{$Item14A=$_POST['Item14A'];} if(!(isset($_POST['Item15A']))){$Item15A='';}else{$Item15A=$_POST['Item15A'];} if(!(isset($_POST['Item16A']))){$Item16A='';}else{$Item16A=$_POST['Item16A'];} if(!(isset($_POST['Item17A']))){$Item17A='';}else{$Item17A=$_POST['Item17A'];} if(!(isset($_POST['Item18A']))){$Item18A='';}else{$Item18A=$_POST['Item18A'];} if(!(isset($_POST['Item19A']))){$Item19A='';}else{$Item19A=$_POST['Item19A'];} if(!(isset($_POST['Item20A']))){$Item20A='';}else{$Item20A=$_POST['Item20A'];} //BillingType if(!(isset($_POST['Item1B']))){$Item1B='';}else{$Item1B=$_POST['Item1B'];} if(!(isset($_POST['Item2B']))){$Item2B='';}else{$Item2B=$_POST['Item2B'];} if(!(isset($_POST['Item3B']))){$Item3B='';}else{$Item3B=$_POST['Item3B'];} if(!(isset($_POST['Item4B']))){$Item4B='';}else{$Item4B=$_POST['Item4B'];} if(!(isset($_POST['Item5B']))){$Item5B='';}else{$Item5B=$_POST['Item5B'];} if(!(isset($_POST['Item6B']))){$Item6B='';}else{$Item6B=$_POST['Item6B'];} if(!(isset($_POST['Item7B']))){$Item7B='';}else{$Item7B=$_POST['Item7B'];} if(!(isset($_POST['Item8B']))){$Item8B='';}else{$Item8B=$_POST['Item8B'];} if(!(isset($_POST['Item9B']))){$Item9B='';}else{$Item9B=$_POST['Item9B'];} if(!(isset($_POST['Item10B']))){$Item10B='';}else{$Item10B=$_POST['Item10B'];} if(!(isset($_POST['Item11B']))){$Item11B='';}else{$Item11B=$_POST['Item11B'];} if(!(isset($_POST['Item12B']))){$Item12B='';}else{$Item12B=$_POST['Item12B'];} if(!(isset($_POST['Item13B']))){$Item13B='';}else{$Item13B=$_POST['Item13B'];} if(!(isset($_POST['Item14B']))){$Item14B='';}else{$Item14B=$_POST['Item14B'];} if(!(isset($_POST['Item15B']))){$Item15B='';}else{$Item15B=$_POST['Item15B'];} if(!(isset($_POST['Item16B']))){$Item16B='';}else{$Item16B=$_POST['Item16B'];} if(!(isset($_POST['Item17B']))){$Item17B='';}else{$Item17B=$_POST['Item17B'];} if(!(isset($_POST['Item18B']))){$Item18B='';}else{$Item18B=$_POST['Item18B'];} if(!(isset($_POST['Item19B']))){$Item19B='';}else{$Item19B=$_POST['Item19B'];} if(!(isset($_POST['Item20B']))){$Item20B='';}else{$Item20B=$_POST['Item20B'];} //Comments if(!(isset($_POST['Item1T']))){$Item1T='';}else{$Item1T=$_POST['Item1T'];} if(!(isset($_POST['Item2T']))){$Item2T='';}else{$Item2T=$_POST['Item2T'];} if(!(isset($_POST['Item3T']))){$Item3T='';}else{$Item3T=$_POST['Item3T'];} if(!(isset($_POST['Item4T']))){$Item4T='';}else{$Item4T=$_POST['Item4T'];} if(!(isset($_POST['Item5T']))){$Item5T='';}else{$Item5T=$_POST['Item5T'];} if(!(isset($_POST['Item6T']))){$Item6T='';}else{$Item6T=$_POST['Item6T'];} if(!(isset($_POST['Item7T']))){$Item7T='';}else{$Item7T=$_POST['Item7T'];} if(!(isset($_POST['Item8T']))){$Item8T='';}else{$Item8T=$_POST['Item8T'];} if(!(isset($_POST['Item9T']))){$Item9T='';}else{$Item9T=$_POST['Item9T'];} if(!(isset($_POST['Item10T']))){$Item10T='';}else{$Item10T=$_POST['Item10T'];} if(!(isset($_POST['Item11T']))){$Item11T='';}else{$Item11T=$_POST['Item11T'];} if(!(isset($_POST['Item12T']))){$Item12T='';}else{$Item12T=$_POST['Item12T'];} if(!(isset($_POST['Item13T']))){$Item13T='';}else{$Item13T=$_POST['Item13T'];} if(!(isset($_POST['Item14T']))){$Item14T='';}else{$Item14T=$_POST['Item14T'];} if(!(isset($_POST['Item15T']))){$Item15T='';}else{$Item15T=$_POST['Item15T'];} if(!(isset($_POST['Item16T']))){$Item16T='';}else{$Item16T=$_POST['Item16T'];} if(!(isset($_POST['Item17T']))){$Item17T='';}else{$Item17T=$_POST['Item17T'];} if(!(isset($_POST['Item18T']))){$Item18T='';}else{$Item18T=$_POST['Item18T'];} if(!(isset($_POST['Item19T']))){$Item19T='';}else{$Item19T=$_POST['Item19T'];} if(!(isset($_POST['Item20T']))){$Item20T='';}else{$Item20T=$_POST['Item20T'];} //////////////////////////// //************************// //* Setup SQL Variables *// //************************// //////////////////////////// //The Table+Prefix $datatable=$tblpre."Equipment"; //INSERTS ---- THIS IS LINE 180 $Item1Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('1', '".$Item1."', '".$Item1D."', '".$Item1Q."', '".$Item1A."', '"$Item1B"', '".$Item1T."')"; $Item2Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('2', '".$Item2."', '".$Item2D."', '".$Item2Q."', '".$Item2A."', '"$Item2B"', '".$Item2T."')"; $Item3Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('3', '".$Item3."', '".$Item3D."', '".$Item3Q."', '".$Item3A."', '"$Item3B"', '".$Item3T."')"; $Item4Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('4', '".$Item4."', '".$Item4D."', '".$Item4Q."', '".$Item4A."', '"$Item4B"', '".$Item4T."')"; $Item5Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('5', '".$Item5."', '".$Item5D."', '".$Item5Q."', '".$Item5A."', '"$Item5B"', '".$Item5T."')"; $Item6Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('6', '".$Item6."', '".$Item6D."', '".$Item6Q."', '".$Item6A."', '"$Item6B"', '".$Item6T."')"; $Item7Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('7', '".$Item7."', '".$Item7D."', '".$Item7Q."', '".$Item7A."', '"$Item7B"', '".$Item7T."')"; $Item8Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('8', '".$Item8."', '".$Item8D."', '".$Item8Q."', '".$Item8A."', '"$Item8B"', '".$Item8T."')"; $Item9Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('9', '".$Item9."', '".$Item9D."', '".$Item9Q."', '".$Item9A."', '"$Item9B"', '".$Item9T."')"; $Item10Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('10', '".$Item10."', '".$Item10D."', '".$Item10Q."', '".$Item10A."', '"$Item10B"', '".$Item10T."')"; $Item11Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('11', '".$Item11."', '".$Item11D."', '".$Item11Q."', '".$Item11A."', '"$Item11B"', '".$Item11T."')"; $Item12Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('12', '".$Item12."', '".$Item12D."', '".$Item12Q."', '".$Item12A."', '"$Item12B"', '".$Item12T."')"; $Item13Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('13', '".$Item13."', '".$Item13D."', '".$Item13Q."', '".$Item13A."', '"$Item13B"', '".$Item13T."')"; $Item14Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('14', '".$Item14."', '".$Item14D."', '".$Item14Q."', '".$Item14A."', '"$Item14B"', '".$Item14T."')"; $Item15Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('15', '".$Item15."', '".$Item15D."', '".$Item15Q."', '".$Item15A."', '"$Item15B"', '".$Item15T."')"; $Item16Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('16', '".$Item16."', '".$Item16D."', '".$Item16Q."', '".$Item16A."', '"$Item16B"', '".$Item16T."')"; $Item17Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('17', '".$Item17."', '".$Item17D."', '".$Item17Q."', '".$Item17A."', '"$Item17B"', '".$Item17T."')"; $Item18Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('18', '".$Item18."', '".$Item18D."', '".$Item18Q."', '".$Item18A."', '"$Item18B"', '".$Item18T."')"; $Item19Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('19', '".$Item19."', '".$Item19D."', '".$Item19Q."', '".$Item19A."', '"$Item19B"', '".$Item19T."')"; $Item20Insert="INSERT INTO [".$datatable."] (ID, Equipment#, Description, Qty, ChargeAmount, BilingType, Comments) VALUES ('20', '".$Item20."', '".$Item20D."', '".$Item20Q."', '".$Item20A."', '"$Item20B"', '".$Item20T."')"; //UPDATES $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item1."', Description='".$Item1D."', Qty='".$Item1Q."', ChargeAmount='".$Item1A."', BillingType='".$Item1B."', Comments='".$Item1T."' WHERE ID='1'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item2."', Description='".$Item2D."', Qty='".$Item2Q."', ChargeAmount='".$Item2A."', BillingType='".$Item2B."', Comments='".$Item2T."' WHERE ID='2'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item3."', Description='".$Item3D."', Qty='".$Item3Q."', ChargeAmount='".$Item3A."', BillingType='".$Item3B."', Comments='".$Item3T."' WHERE ID='3'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item4."', Description='".$Item4D."', Qty='".$Item4Q."', ChargeAmount='".$Item4A."', BillingType='".$Item4B."', Comments='".$Item4T."' WHERE ID='4'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item5."', Description='".$Item5D."', Qty='".$Item5Q."', ChargeAmount='".$Item5A."', BillingType='".$Item5B."', Comments='".$Item5T."' WHERE ID='5'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item6."', Description='".$Item6D."', Qty='".$Item6Q."', ChargeAmount='".$Item6A."', BillingType='".$Item6B."', Comments='".$Item6T."' WHERE ID='6'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item7."', Description='".$Item7D."', Qty='".$Item7Q."', ChargeAmount='".$Item7A."', BillingType='".$Item7B."', Comments='".$Item7T."' WHERE ID='7'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item8."', Description='".$Item8D."', Qty='".$Item8Q."', ChargeAmount='".$Item8A."', BillingType='".$Item8B."', Comments='".$Item8T."' WHERE ID='8'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item9."', Description='".$Item9D."', Qty='".$Item9Q."', ChargeAmount='".$Item9A."', BillingType='".$Item9B."', Comments='".$Item9T."' WHERE ID='9'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item10."', Description='".$Item10D."', Qty='".$Item10Q."', ChargeAmount='".$Item10A."', BillingType='".$Item10B."', Comments='".$Item10T."' WHERE ID='10'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item11."', Description='".$Item11D."', Qty='".$Item11Q."', ChargeAmount='".$Item11A."', BillingType='".$Item11B."', Comments='".$Item11T."' WHERE ID='11'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item12."', Description='".$Item12D."', Qty='".$Item12Q."', ChargeAmount='".$Item12A."', BillingType='".$Item12B."', Comments='".$Item12T."' WHERE ID='12'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item13."', Description='".$Item13D."', Qty='".$Item13Q."', ChargeAmount='".$Item13A."', BillingType='".$Item13B."', Comments='".$Item13T."' WHERE ID='13'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item14."', Description='".$Item14D."', Qty='".$Item14Q."', ChargeAmount='".$Item14A."', BillingType='".$Item14B."', Comments='".$Item14T."' WHERE ID='14'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item15."', Description='".$Item15D."', Qty='".$Item15Q."', ChargeAmount='".$Item15A."', BillingType='".$Item15B."', Comments='".$Item15T."' WHERE ID='15'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item16."', Description='".$Item16D."', Qty='".$Item16Q."', ChargeAmount='".$Item16A."', BillingType='".$Item16B."', Comments='".$Item16T."' WHERE ID='16'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item17."', Description='".$Item17D."', Qty='".$Item17Q."', ChargeAmount='".$Item17A."', BillingType='".$Item17B."', Comments='".$Item17T."' WHERE ID='17'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item18."', Description='".$Item18D."', Qty='".$Item18Q."', ChargeAmount='".$Item18A."', BillingType='".$Item18B."', Comments='".$Item18T."' WHERE ID='18'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item19."', Description='".$Item19D."', Qty='".$Item19Q."', ChargeAmount='".$Item19A."', BillingType='".$Item19B."', Comments='".$Item19T."' WHERE ID='19'"; $ItemUpdate="UPDATE [".$datatable."] SET Equipment#='".$Item20."', Description='".$Item20D."', Qty='".$Item20Q."', ChargeAmount='".$Item20A."', BillingType='".$Item20B."', Comments='".$Item20T."' WHERE ID='20'"; //////////////////////////// //************************// //* Start SQL Injections *// //************************// //////////////////////////// $Success=0; $Fail=0; if($count<=0) { //INSERT QUERYS if(mssql_query($Item1Insert)){$Success++;echo("<font color='green'>Item1 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item1 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item2Insert)){$Success++;echo("<font color='green'>Item2 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item2 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item3Insert)){$Success++;echo("<font color='green'>Item3 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item3 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item4Insert)){$Success++;echo("<font color='green'>Item4 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item4 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item5Insert)){$Success++;echo("<font color='green'>Item5 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item5 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item6Insert)){$Success++;echo("<font color='green'>Item6 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item6 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item7Insert)){$Success++;echo("<font color='green'>Item7 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item7 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item8Insert)){$Success++;echo("<font color='green'>Item8 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item8 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item9Insert)){$Success++;echo("<font color='green'>Item9 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item9 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item10Insert)){$Success++;echo("<font color='green'>Item10 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item10 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item11Insert)){$Success++;echo("<font color='green'>Item11 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item11 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item12Insert)){$Success++;echo("<font color='green'>Item12 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item12 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item13Insert)){$Success++;echo("<font color='green'>Item13 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item13 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item14Insert)){$Success++;echo("<font color='green'>Item14 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item14 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item15Insert)){$Success++;echo("<font color='green'>Item15 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item15 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item16Insert)){$Success++;echo("<font color='green'>Item16 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item16 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item17Insert)){$Success++;echo("<font color='green'>Item17 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item17 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item18Insert)){$Success++;echo("<font color='green'>Item18 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item18 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item19Insert)){$Success++;echo("<font color='green'>Item19 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item19 Submission FAILED!:</font>".mssql_error());} if(mssql_query($Item20Insert)){$Success++;echo("<font color='green'>Item20 Submitted Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item20 Submission FAILED!:</font>".mssql_error());} } elseif($count>=0) { //UPDATE QUERYS if(mssql_query($Item1Update)){$Success++;echo("<font color='green'>Item1 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item1 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item2Update)){$Success++;echo("<font color='green'>Item2 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item2 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item3Update)){$Success++;echo("<font color='green'>Item3 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item3 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item4Update)){$Success++;echo("<font color='green'>Item4 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item4 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item5Update)){$Success++;echo("<font color='green'>Item5 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item5 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item6Update)){$Success++;echo("<font color='green'>Item6 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item6 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item7Update)){$Success++;echo("<font color='green'>Item7 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item7 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item8Update)){$Success++;echo("<font color='green'>Item8 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item8 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item9Update)){$Success++;echo("<font color='green'>Item9 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item9 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item10Update)){$Success++;echo("<font color='green'>Item10 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item10 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item11Update)){$Success++;echo("<font color='green'>Item11 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item11 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item12Update)){$Success++;echo("<font color='green'>Item12 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item12 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item13Update)){$Success++;echo("<font color='green'>Item13 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item13 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item14Update)){$Success++;echo("<font color='green'>Item14 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item14 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item15Update)){$Success++;echo("<font color='green'>Item15 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item15 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item16Update)){$Success++;echo("<font color='green'>Item16 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item16 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item17Update)){$Success++;echo("<font color='green'>Item17 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item17 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item18Update)){$Success++;echo("<font color='green'>Item18 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item18 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item19Update)){$Success++;echo("<font color='green'>Item19 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item19 Update FAILED!:</font>".mssql_error());} if(mssql_query($Item20Update)){$Success++;echo("<font color='green'>Item20 Updated Successfully!</font>");}else{$Fail++;echo("<font color='red'>Item20 Update FAILED!:</font>".mssql_error());} } if($Success==20&&$Fail==0) { echo("<meta http-equiv='refresh' content='5;url=http://".$domain.$sPath."admin/Edits/Equipment.php'>"); } else { echo("<h2><font color='green'>Equipment Submission FAILED!!!:</font></h2>".mssql_error()); } ?> Quote Link to comment Share on other sites More sharing options...
revraz Posted June 30, 2008 Share Posted June 30, 2008 With that much code, it would help if you pointed out the line with the error seperately. Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted June 30, 2008 Author Share Posted June 30, 2008 thats the problem I don't know.. it claims 181 but I don't see anything there ... nvrm when i went back to mark line 180 above I found the problem.. missing some " .'s " next to ITEM B good job revraz.. lol thanks for responding .. your always helpful Quote Link to comment Share on other sites More sharing options...
revraz Posted June 30, 2008 Share Posted June 30, 2008 It's rarely the line that it states, it's usually right before it because the next line will error Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.